diff options
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index fbdd7cc..8640832 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -223,10 +223,13 @@ add_subdirectory(src bin) # Installation ## -file(GLOB DATA_FILES "data/*") - -# Data -install(DIRECTORY data/ DESTINATION ${COLOBOT_INSTALL_DATA_DIR}) +# Data: check if the submodule handles its own installation +if(EXISTS "${CMAKE_SOURCE_DIR}/data/CMakeLists.txt") + message(STATUS "Data directory will install itself.") + add_subdirectory(data) +else() + message(WARNING "Data directory is not available; make sure colobot-data is installed in ${COLOBOT_INSTALL_DATA_DIR}.") +endif() # Documentation if(INSTALL_DOCS AND DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND) |