summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDidier Raboud <odyx@debian.org>2012-12-17 10:11:56 +0100
committerDidier Raboud <odyx@debian.org>2012-12-17 10:15:14 +0100
commite062b74a3a0081e07527ffdbf1256d775a41bce1 (patch)
tree0ccd65a52d1853db4517c9f6a52b836889cb0b17
parent5a78b26f758ed0fa4b603ef086d21965e15010cd (diff)
downloadcolobot-e062b74a3a0081e07527ffdbf1256d775a41bce1.tar.gz
colobot-e062b74a3a0081e07527ffdbf1256d775a41bce1.tar.bz2
colobot-e062b74a3a0081e07527ffdbf1256d775a41bce1.zip
Install libCBot to a private directory
closes #90 - Make it configurable; - Move stanzas above the src directory inclusion, otherwise the value doesn't propagate.
-rw-r--r--CMakeLists.txt6
-rw-r--r--src/CBot/CMakeLists.txt2
-rw-r--r--src/CMakeLists.txt3
3 files changed, 7 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5238c1e..b60ac93 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -159,9 +159,11 @@ if(${TESTS})
endif()
+# TODO: provide data files as git submodule
+set(COLOBOT_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/games/colobot CACHE PATH "Colobot shared data directory")
+set(COLOBOT_LIB_DIR ${CMAKE_INSTALL_PREFIX}/lib/colobot CACHE PATH "Colobot libraries directory")
+
# Subdirectory with sources
add_subdirectory(src bin)
-# TODO: provide data files as git submodule
-set(COLOBOT_DATA_DIR ${CMAKE_INSTALL_PREFIX}/share/games/colobot CACHE PATH "Colobot shared data directory")
install(DIRECTORY ../data DESTINATION ${COLOBOT_DATA_DIR})
diff --git a/src/CBot/CMakeLists.txt b/src/CBot/CMakeLists.txt
index 271f2ce..12d7262 100644
--- a/src/CBot/CMakeLists.txt
+++ b/src/CBot/CMakeLists.txt
@@ -18,4 +18,4 @@ else()
add_library(CBot SHARED ${SOURCES})
endif()
-INSTALL_TARGETS(/lib CBot)
+install(TARGETS CBot LIBRARY DESTINATION "${COLOBOT_LIB_DIR}")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 4ffacd3..a7f3441 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -195,4 +195,5 @@ add_executable(colobot ${SOURCES})
target_link_libraries(colobot ${LIBS})
-install_targets(/games colobot)
+install(TARGETS colobot RUNTIME DESTINATION games/)
+set_target_properties(colobot PROPERTIES INSTALL_RPATH ${COLOBOT_LIB_DIR})