From ffb4d9ff4fbee5c96ff7828044e9002d85843b6a Mon Sep 17 00:00:00 2001 From: Didier Raboud Date: Wed, 2 Jan 2013 14:23:17 +0100 Subject: [PATCH] Let CMake rely on data's CMakeLists.txt if it exists - Also update data to latest 'dev', where the CMakeLists exists --- CMakeLists.txt | 11 +++++++---- data | 2 +- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index fbdd7cc1..8640832a 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) diff --git a/data b/data index 6b6e5a0a..5a991a77 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 6b6e5a0ab56bf42f17d969c1bd4c09185605cad6 +Subproject commit 5a991a77eb5f476d29b4d4f976be48fdf74a053f