aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt18
1 files changed, 17 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 5f04214..f656cb4 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -10,9 +10,10 @@ set (GETTEXT_PACKAGE ${CMAKE_PROJECT_NAME})
option (enable_tests "Build the package's automatic tests." ON)
option (full_warnings "Full compiler warnings." ON)
option (enable_lcov "Generate lcov code coverage reports." ON)
-
+option (LOCAL_INSTALL "Support local installation." OFF)
find_package(PkgConfig REQUIRED)
+include (GNUInstallDirs)
include (FindPkgConfig)
include (GdbusCodegen)
include (GSettings)
@@ -44,6 +45,21 @@ add_custom_target (cppcheck COMMAND cppcheck --enable=all -q --error-exitcode=2
include_directories (${CMAKE_CURRENT_SOURCE_DIR}/src)
include_directories (${CMAKE_CURRENT_BINARY_DIR}/src)
+# Workaround for libexecdir on debian
+if (EXISTS "/etc/debian_version")
+ set(CMAKE_INSTALL_LIBEXECDIR ${CMAKE_INSTALL_LIBDIR})
+ set(CMAKE_INSTALL_FULL_LIBEXECDIR "${CMAKE_INSTALL_PREFIX}/${CMAKE_INSTALL_LIBEXECDIR}")
+endif()
+message("Installing libexec files to ${CMAKE_INSTALL_FULL_LIBEXECDIR}")
+
+if(${LOCAL_INSTALL})
+ set(DBUSSERVICEDIR "${CMAKE_INSTALL_DATADIR}/dbus-1/services/")
+else()
+ EXEC_PROGRAM(${PKG_CONFIG_EXECUTABLE} ARGS dbus-1 --variable session_bus_services_dir OUTPUT_VARIABLE DBUSSERVICEDIR )
+endif()
+message("Installing DBus services to ${DBUSSERVICEDIR}")
+
+
add_subdirectory (src)
add_subdirectory (data)
add_subdirectory (po)