Merge pull request #114 from OdyX/dev-update-cmake-with-data
Let CMake rely on data's CMakeLists.txt if it existsdev-ui
commit
871542abf5
|
@ -202,11 +202,11 @@ if(${TESTS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
# Installation paths defined before compiling sources
|
# Installation paths defined before compiling sources
|
||||||
set(COLOBOT_INSTALL_BIN_DIR games CACHE PATH "Colobot binary directory")
|
set(COLOBOT_INSTALL_BIN_DIR ${CMAKE_INSTALL_PREFIX}/games CACHE PATH "Colobot binary directory")
|
||||||
set(COLOBOT_INSTALL_DATA_DIR share/games/colobot CACHE PATH "Colobot shared data directory")
|
set(COLOBOT_INSTALL_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/games/colobot CACHE PATH "Colobot shared data directory")
|
||||||
set(COLOBOT_INSTALL_LIB_DIR lib/colobot CACHE PATH "Colobot libraries directory")
|
set(COLOBOT_INSTALL_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib/colobot CACHE PATH "Colobot libraries directory")
|
||||||
set(COLOBOT_INSTALL_DOC_DIR share/doc/colobot CACHE PATH "Colobot documentation directory")
|
set(COLOBOT_INSTALL_DOC_DIR ${CMAKE_INSTALL_PREFIX}/share/doc/colobot CACHE PATH "Colobot documentation directory")
|
||||||
set(COLOBOT_INSTALL_I18N_DIR share/locale CACHE PATH "Colobot translations directory")
|
set(COLOBOT_INSTALL_I18N_DIR ${CMAKE_INSTALL_PREFIX}/share/locale CACHE PATH "Colobot translations directory")
|
||||||
|
|
||||||
# Subdirectory with sources
|
# Subdirectory with sources
|
||||||
add_subdirectory(src bin)
|
add_subdirectory(src bin)
|
||||||
|
@ -216,10 +216,13 @@ add_subdirectory(src bin)
|
||||||
# Installation
|
# Installation
|
||||||
##
|
##
|
||||||
|
|
||||||
file(GLOB DATA_FILES "data/*")
|
# Data: check if the submodule handles its own installation
|
||||||
|
if(EXISTS "${CMAKE_SOURCE_DIR}/data/CMakeLists.txt")
|
||||||
# Data
|
message(STATUS "Data directory will install itself.")
|
||||||
install(DIRECTORY data/ DESTINATION ${COLOBOT_INSTALL_DATA_DIR})
|
add_subdirectory(data)
|
||||||
|
else()
|
||||||
|
message(WARNING "Data directory is not available; make sure colobot-data is installed in ${COLOBOT_INSTALL_DATA_DIR}.")
|
||||||
|
endif()
|
||||||
|
|
||||||
# Documentation
|
# Documentation
|
||||||
if(INSTALL_DOCS AND DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
|
if(INSTALL_DOCS AND DOXYGEN_FOUND AND DOXYGEN_DOT_FOUND)
|
||||||
|
|
2
data
2
data
|
@ -1 +1 @@
|
||||||
Subproject commit 6b6e5a0ab56bf42f17d969c1bd4c09185605cad6
|
Subproject commit 5a991a77eb5f476d29b4d4f976be48fdf74a053f
|
Loading…
Reference in New Issue