build: configure default installation directories in cmake 44/27044/2
authorRafal Krypa <r.krypa@samsung.com>
Wed, 3 Sep 2014 14:05:03 +0000 (16:05 +0200)
committerGerrit Code Review <gerrit@review.vlan103.tizen.org>
Thu, 4 Sep 2014 17:48:26 +0000 (10:48 -0700)
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 <r.krypa@samsung.com>
CMakeLists.txt
src/service/CMakeLists.txt
test/CMakeLists.txt

index 8cdd475..18b0dee 100644 (file)
@@ -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")
index 47482eb..ce1e67d 100644 (file)
@@ -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})
index c3e3eea..b04f6d8 100644 (file)
@@ -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})