diff options
author | José Bollo <jose.bollo@iot.bzh> | 2018-09-11 11:28:34 +0200 |
---|---|---|
committer | Jose Bollo <jose.bollo@iot.bzh> | 2018-09-17 13:17:56 +0200 |
commit | 7ae3477d84ae13c5e9ef9bb1980a8f70f8b7e9bf (patch) | |
tree | 46c1ddda9a4dcc4782ceab8deb2f891ad3b0f2c8 /CMakeLists.txt | |
parent | 11654afcb5753a54a033db12e1ed4a19b3f7c86e (diff) |
Make it work for AGL
Signed-off-by: José Bollo <jose.bollo@iot.bzh>
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r-- | CMakeLists.txt | 27 |
1 files changed, 17 insertions, 10 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index 8a3c9f1..d4ed7c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -23,13 +23,16 @@ PROJECT(cynara C) SET(PROJECT_NAME "Cynara") SET(PROJECT_PRETTY_NAME "Permission database") SET(PROJECT_DESCRIPTION "Secured permission database for applications") -SET(PROJECT_VERSION "1.99.RC1") +SET(PROJECT_VERSION "1.99.99") set(PROJECT_URL "https://gerrit.automotivelinux.org/gerrit/gitweb?p=src/cynara.git;a=summary") INCLUDE(FindPkgConfig) INCLUDE(CheckIncludeFiles) INCLUDE(CheckLibraryExists) INCLUDE(GNUInstallDirs) +if(NOT CMAKE_INSTALL_FULL_RUNSTATEDIR) + set(CMAKE_INSTALL_FULL_RUNSTATEDIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/run") +endif() INCLUDE(CTest) ########################################################################### @@ -41,6 +44,13 @@ set(CYNARA_SOVERSION 1.99) add_definitions(-DCYNARA_VERSION="${CYNARA_VERSION}") set(SYSTEMD ON CACHE BOOL "should use systemd") +set(DEFAULT_DB_DIR "${CMAKE_INSTALL_FULL_LOCALSTATEDIR}/lib/cynara" + CACHE PATH "directory path of the database") +set(DEFAULT_SOCKET_DIR "${CMAKE_INSTALL_FULL_RUNSTATEDIR}" + CACHE PATH "directory path of the sockets") +set(DEFAULT_CONFIG_DIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/security" + CACHE PATH "directory of configuration") +set(DEFAULT_INIT_FILE "${DEFAULT_CONFIG_DIR}/cynara.initial") ########################################################################### @@ -65,18 +75,15 @@ set(CMAKE_C_FLAGS_CCOV "-g -O2 --coverage") if(SYSTEMD) PKG_CHECK_MODULES(libsystemd REQUIRED libsystemd>=222) -endif() - -if(SYSTEMD) - set(SOCKET_DIR "/run/platform" - CACHE PATH "path of the socket system directories") - set(SYSTEMD_UNIT_DIR "${CMAKE_INSTALL_FULL_LIBDIR}/systemd/system" - CACHE PATH "Path to systemd system unit files") - set(CHECK_SOCKET_SPEC "unix:${SOCKET_DIR}/cynara.check") - set(ADMIN_SOCKET_SPEC "unix:${SOCKET_DIR}/cynara.admin") add_subdirectory(systemd) endif() + add_subdirectory(include) add_subdirectory(src) add_subdirectory(pkgconfig) +install(FILES + ${CMAKE_CURRENT_SOURCE_DIR}/cynara.initial + DESTINATION + ${DEFAULT_CONFIG_DIR} +) |