From: Rafal Krypa Date: Wed, 3 Sep 2014 14:05:03 +0000 (+0200) Subject: build: configure default installation directories in cmake X-Git-Tag: accepted/tizen/common/20140905.175100~4 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=refs%2Fchanges%2F44%2F27044%2F2;p=platform%2Fcore%2Fsecurity%2Fcynara.git build: configure default installation directories in cmake Set the default installation paths in main CMakeLists.txt. On Tizen these settings will be overridden by variables passed to cmake by rpmbuild. But having them defined makes the standalone build possible, outside of Tizen. Change-Id: Idf84ff5a5e15fd99912b53e0970198d031bbbee5 Signed-off-by: Rafal Krypa --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 8cdd475..18b0dee 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,23 @@ set(CYNARA_VERSION 0.2.2) INCLUDE(FindPkgConfig) INCLUDE(CheckCXXCompilerFlag) +############################# install dirs ################################## + +SET(LIB_INSTALL_DIR + "${CMAKE_INSTALL_PREFIX}/lib" + CACHE PATH + "Library installation directory") + +SET(BIN_INSTALL_DIR + "${CMAKE_INSTALL_PREFIX}/bin" + CACHE PATH + "Binary installation directory") + +SET(INCLUDE_INSTALL_DIR + "${CMAKE_INSTALL_PREFIX}/include" + CACHE PATH + "Include installation directory") + ############################# compiler flags ################################## SET(CMAKE_CXX_FLAGS_PROFILING "-O0 -g -pg") diff --git a/src/service/CMakeLists.txt b/src/service/CMakeLists.txt index 47482eb..ce1e67d 100644 --- a/src/service/CMakeLists.txt +++ b/src/service/CMakeLists.txt @@ -42,4 +42,4 @@ TARGET_LINK_LIBRARIES(${TARGET_CYNARA} ${TARGET_CYNARA_COMMON} ) -INSTALL(TARGETS ${TARGET_CYNARA} DESTINATION bin) +INSTALL(TARGETS ${TARGET_CYNARA} DESTINATION ${BIN_INSTALL_DIR}) diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index c3e3eea..b04f6d8 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -69,4 +69,4 @@ ADD_EXECUTABLE(${TARGET_CYNARA_TESTS} TARGET_LINK_LIBRARIES(${TARGET_CYNARA_TESTS} ${PKGS_LDFLAGS} ${PKGS_LIBRARIES} ) -INSTALL(TARGETS ${TARGET_CYNARA_TESTS} DESTINATION bin) +INSTALL(TARGETS ${TARGET_CYNARA_TESTS} DESTINATION ${BIN_INSTALL_DIR})