Let cmake test if stk-assets exists in the expected place. If not,
cmake is aborted with an error message. The option -DCHECK_ASSETS=off option can be used to disable this test. The latter is also used for travis.
This commit is contained in:
parent
9c35da4b6c
commit
84a1e32ade
@ -24,7 +24,7 @@ script:
|
||||
# Build commands
|
||||
- mkdir build
|
||||
- cd build
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=Debug
|
||||
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DCHECK_ASSETS=off
|
||||
- make VERBOSE=1 -j 4
|
||||
notifications:
|
||||
irc:
|
||||
|
@ -13,6 +13,8 @@ endif()
|
||||
|
||||
option(USE_WIIUSE "Support for wiimote input devices" ON)
|
||||
option(USE_FRIBIDI "Support for right-to-left languages" ON)
|
||||
option(CHECK_ASSETS "Check if assets are installed in ../stk-assets" ON)
|
||||
|
||||
if(UNIX)
|
||||
option(USE_CPP2011 "Activate C++ 2011 mode (GCC only)" OFF)
|
||||
endif()
|
||||
@ -319,10 +321,13 @@ if(NOT IS_DIRECTORY ../data)
|
||||
endif()
|
||||
|
||||
# ==== Checking if stk-assets folder exists ====
|
||||
if(NOT IS_DIRECTORY ../../stk-assets)
|
||||
set (CUR_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
get_filename_component(PARENT_DIR ${CUR_DIR} PATH)
|
||||
message( FATAL_ERROR "${PARENT_DIR}/stk-assets folder doesn't exist" )
|
||||
if(CHECK_ASSETS)
|
||||
if(NOT IS_DIRECTORY ../../stk-assets)
|
||||
set (CUR_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
get_filename_component(PARENT_DIR ${CUR_DIR} PATH)
|
||||
message( FATAL_ERROR "${PARENT_DIR}/stk-assets folder doesn't exist. "
|
||||
"Please download the stk-assets, or disable this test with -DCHECK_ASSETS=off." )
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set(PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||
|
Loading…
Reference in New Issue
Block a user