Don't complain about angelscript library not found in system

This commit is contained in:
Deve 2015-09-07 18:14:57 +02:00
parent bd49fa4fd8
commit bfa92bc339

View File

@ -124,9 +124,15 @@ endif()
# Build the angelscript library if not in system # Build the angelscript library if not in system
find_package(Angelscript) if(USE_SYSTEM_ANGELSCRIPT)
if(USE_SYSTEM_ANGELSCRIPT AND ANGELSCRIPT_FOUND) find_package(Angelscript)
include_directories(${Angelscript_INCLUDE_DIRS}) 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() else()
add_subdirectory("${PROJECT_SOURCE_DIR}/lib/angelscript/projects/cmake") add_subdirectory("${PROJECT_SOURCE_DIR}/lib/angelscript/projects/cmake")
include_directories("${PROJECT_SOURCE_DIR}/lib/angelscript/include") include_directories("${PROJECT_SOURCE_DIR}/lib/angelscript/include")