From bfa92bc339e80ffe76340c3a364ea38e14bc658b Mon Sep 17 00:00:00 2001 From: Deve Date: Mon, 7 Sep 2015 18:14:57 +0200 Subject: [PATCH] Don't complain about angelscript library not found in system --- CMakeLists.txt | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d37ae43c..5bf3a8d8c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -124,9 +124,15 @@ endif() # Build the angelscript library if not in system -find_package(Angelscript) -if(USE_SYSTEM_ANGELSCRIPT AND ANGELSCRIPT_FOUND) - include_directories(${Angelscript_INCLUDE_DIRS}) +if(USE_SYSTEM_ANGELSCRIPT) + find_package(Angelscript) + if(ANGELSCRIPT_FOUND) + include_directories(${Angelscript_INCLUDE_DIRS}) + else() + message(FATAL_ERROR "Angelscript not found. " + "Either install angelscript or use built-in version using " + "-DUSE_SYSTEM_ANGELSCRIPT=0") + endif() else() add_subdirectory("${PROJECT_SOURCE_DIR}/lib/angelscript/projects/cmake") include_directories("${PROJECT_SOURCE_DIR}/lib/angelscript/include")