From 16d97f91212c1b1b4cd775ab9808afb66b648267 Mon Sep 17 00:00:00 2001 From: Didier Raboud Date: Sun, 30 Dec 2012 12:16:43 +0100 Subject: Revert "Minor cmake grammar fix" It appears I was really wrong. Damn. This reverts commit 277629f9fec069afce32a21fd6baeb4f24d5784c. --- CMakeLists.txt | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 399ae96..fbdd7cc 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -209,11 +209,11 @@ if(${TESTS}) endif() # Installation paths defined before compiling sources -set(COLOBOT_INSTALL_BIN_DIR games CACHE PATH "Colobot binary directory") -set(COLOBOT_INSTALL_DATA_DIR share/games/colobot CACHE PATH "Colobot shared data directory") -set(COLOBOT_INSTALL_LIB_DIR lib/colobot CACHE PATH "Colobot libraries directory") -set(COLOBOT_INSTALL_DOC_DIR share/doc/colobot CACHE PATH "Colobot documentation directory") -set(COLOBOT_INSTALL_I18N_DIR share/locale CACHE PATH "Colobot translations directory") +set(COLOBOT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/games CACHE PATH "Colobot binary directory") +set(COLOBOT_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/games/colobot CACHE PATH "Colobot shared data directory") +set(COLOBOT_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib/colobot CACHE PATH "Colobot libraries directory") +set(COLOBOT_INSTALL_DOC_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/colobot CACHE PATH "Colobot documentation directory") +set(COLOBOT_INSTALL_I18N_DIR ${CMAKE_INSTALL_PREFIX}/share/locale CACHE PATH "Colobot translations directory") # Subdirectory with sources add_subdirectory(src bin) -- cgit v1.2.3-1-g7c22 From ffb4d9ff4fbee5c96ff7828044e9002d85843b6a Mon Sep 17 00:00:00 2001 From: Didier Raboud Date: Wed, 2 Jan 2013 14:23:17 +0100 Subject: 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 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) diff --git a/data b/data index 6b6e5a0..5a991a7 160000 --- a/data +++ b/data @@ -1 +1 @@ -Subproject commit 6b6e5a0ab56bf42f17d969c1bd4c09185605cad6 +Subproject commit 5a991a77eb5f476d29b4d4f976be48fdf74a053f -- cgit v1.2.3-1-g7c22