X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=CMakeLists.txt;fp=CMakeLists.txt;h=b784621ade56ae3521dd0dc87342ec169fa35ebc;hb=3e3a29fa49ec494800a4aa866d84fba4eaa8261b;hp=1a6d21842e4c468e929d7a96f2ee3f7f1a504a20;hpb=d1e30006b071533ae2d1903251962d2dec452418;p=src%2Fapp-framework-binder.git diff --git a/CMakeLists.txt b/CMakeLists.txt index 1a6d2184..b784621a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -39,6 +39,11 @@ INCLUDE(CTest) # possible settings set(AGL_DEVEL OFF CACHE BOOL "Activates developping features") set(INCLUDE_MONITORING OFF CACHE BOOL "Activates installation of monitoring") +set(INCLUDE_SUPERVISOR OFF CACHE BOOL "Activates installation of supervisor") +set(AFS_SURPERVISION_SOCKET "@urn:AGL:afs:supervision:socket" CACHE STRING "Internal socket for supervision") +set(AFS_SUPERVISOR_PORT 1619 CACHE STRING "Port of service for the supervisor") +set(AFS_SUPERVISOR_TOKEN HELLO CACHE STRING "Secret token for the supervisor") +set(UNITDIR_SYSTEM ${CMAKE_INSTALL_LIBDIR}/systemd/system CACHE STRING "Path to systemd system unit files") ########################################################################### @@ -80,6 +85,8 @@ PKG_CHECK_MODULES(openssl openssl) PKG_CHECK_MODULES(uuid uuid) PKG_CHECK_MODULES(cynara cynara-client) +ADD_DEFINITIONS("-DAFS_SURPERVISION_SOCKET=\"${AFS_SURPERVISION_SOCKET}\"") + IF(AGL_DEVEL) ADD_DEFINITIONS(-DAGL_DEVEL) endif() @@ -176,3 +183,13 @@ ELSE() ) ENDIF() + +IF(INCLUDE_SUPERVISOR) + CONFIGURE_FILE(afs-supervisor.service.in afs-supervisor.service @ONLY) + INSTALL(FILES + ${CMAKE_CURRENT_BINARY_DIR}/afs-supervisor.service + DESTINATION + ${UNITDIR_SYSTEM} + ) +ENDIF() +