Install libCBot to a private directory

closes #90

- Make it configurable;
- Move stanzas above the src directory inclusion, otherwise the value
  doesn't propagate.
dev-ui
Didier Raboud 2012-12-17 10:11:56 +01:00
parent 5a78b26f75
commit e062b74a3a
3 changed files with 7 additions and 4 deletions

View File

@ -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})

View File

@ -18,4 +18,4 @@ else()
add_library(CBot SHARED ${SOURCES})
endif()
INSTALL_TARGETS(/lib CBot)
install(TARGETS CBot LIBRARY DESTINATION "${COLOBOT_LIB_DIR}")

View File

@ -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})