summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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})