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
|
# Build commands
|
||||||
- mkdir build
|
- mkdir build
|
||||||
- cd build
|
- cd build
|
||||||
- cmake .. -DCMAKE_BUILD_TYPE=Debug
|
- cmake .. -DCMAKE_BUILD_TYPE=Debug -DCHECK_ASSETS=off
|
||||||
- make VERBOSE=1 -j 4
|
- make VERBOSE=1 -j 4
|
||||||
notifications:
|
notifications:
|
||||||
irc:
|
irc:
|
||||||
|
@ -13,6 +13,8 @@ endif()
|
|||||||
|
|
||||||
option(USE_WIIUSE "Support for wiimote input devices" ON)
|
option(USE_WIIUSE "Support for wiimote input devices" ON)
|
||||||
option(USE_FRIBIDI "Support for right-to-left languages" 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)
|
if(UNIX)
|
||||||
option(USE_CPP2011 "Activate C++ 2011 mode (GCC only)" OFF)
|
option(USE_CPP2011 "Activate C++ 2011 mode (GCC only)" OFF)
|
||||||
endif()
|
endif()
|
||||||
@ -319,10 +321,13 @@ if(NOT IS_DIRECTORY ../data)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
# ==== Checking if stk-assets folder exists ====
|
# ==== Checking if stk-assets folder exists ====
|
||||||
if(NOT IS_DIRECTORY ../../stk-assets)
|
if(CHECK_ASSETS)
|
||||||
|
if(NOT IS_DIRECTORY ../../stk-assets)
|
||||||
set (CUR_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
set (CUR_DIR ${CMAKE_CURRENT_SOURCE_DIR})
|
||||||
get_filename_component(PARENT_DIR ${CUR_DIR} PATH)
|
get_filename_component(PARENT_DIR ${CUR_DIR} PATH)
|
||||||
message( FATAL_ERROR "${PARENT_DIR}/stk-assets folder doesn't exist" )
|
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()
|
endif()
|
||||||
|
|
||||||
set(PREFIX ${CMAKE_INSTALL_PREFIX})
|
set(PREFIX ${CMAKE_INSTALL_PREFIX})
|
||||||
|
Loading…
Reference in New Issue
Block a user