summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKevron Rees <tripzero.kev@gmail.com>2015-10-30 10:59:15 -0700
committerKevron Rees <tripzero.kev@gmail.com>2015-10-30 11:06:56 -0700
commit9ce4eb7f7cb6dfc27e26890ea734d1f3405d483b (patch)
treec210a165f96d0f6f458375f5d9a8906a651c43c8
parentf58289bfe99968d702a08e6066d18325aa5a01f9 (diff)
downloadautomotive-message-broker-9ce4eb7f7cb6dfc27e26890ea734d1f3405d483b.tar.gz
cmake: use gnuinstalldirs module to encode install paths
-rw-r--r--CMakeLists.txt20
1 files changed, 10 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 158db1ed..6c767b9a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -5,6 +5,7 @@ set(CMAKE_BUILD_TYPE, Debug)
include(FindPkgConfig)
include(CMakeDependentOption)
+include(GNUInstallDirs)
set(PROJECT_NAME "automotive-message-broker")
set(PROJECT_PRETTY_NAME "Automotive Message Broker")
@@ -22,11 +23,11 @@ add_definitions(-DPROJECT_QUALITY="${PROJECT_QUALITY}")
add_definitions(-DPROJECT_SERIES="${PROJECT_SERIES}")
set (LIB_SUFFIX "" CACHE STRING "Define suffix of directory name (32/64)" )
-set (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/lib${LIB_SUFFIX}/${CMAKE_LIBRARY_ARCHITECTURE}" )
+set (LIB_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBDIR}" )
set (PLUGIN_INSTALL_PATH "${LIB_INSTALL_DIR}/${PROJECT_NAME}")
-set (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/include")
-set (DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/share/doc/packages/${PROJECT_NAME}/${PROJECT_SERIES}")
-set (PLUGIN_SEGMENT_INSTALL_PATH "/etc/ambd/plugins.d")
+set (INCLUDE_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_INCLUDEDIR}")
+set (DOC_INSTALL_DIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_DOCDIR}/${PROJECT_SERIES}")
+set (PLUGIN_SEGMENT_INSTALL_PATH "/${CMAKE_INSTALL_SYSCONFDIR}/ambd/plugins.d")
option(qtmainloop "Use QCoreApplication mainloop " OFF)
option(websocket_plugin "websocket source and sink plugins" OFF)
@@ -54,15 +55,14 @@ set(QMAKE_INSTALL_PATH "/usr/bin/qmake" CACHE PATH "qmake executable path")
set(CMAKE_POSITION_INDEPENDENT_CODE ON)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpie -pie -std=c++14")
-include (CMakeForceCompiler)
-
if (enable_icecc)
- find_program(ICECC /usr/lib/icecc/bin/g++)
+ include (CMakeForceCompiler)
+ find_program(ICECC /usr/lib/icecc/bin/g++)
if (ICECC)
- message(STATUS "icecc will be used for distributed compiling")
- cmake_force_cxx_compiler(${ICECC} icecc)
+ message(STATUS "icecc will be used for distributed compiling")
+ cmake_force_cxx_compiler(${ICECC} icecc)
else(ICECC)
- message(STATUS "Not using icecc")
+ message(STATUS "Not using icecc")
endif(ICECC)
endif(enable_icecc)