X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=conf%2FCMakeLists.txt;h=5f15dd6b9f6c850227c230623550a10e907ca7e7;hb=d06b3d9f5bae5424bcada675eaece47b56eb9e3d;hp=67f60a7f627fc9951e3c1e08a9a19424ac2f4bb5;hpb=ffad58b4a2a45613101f4dca75cf6cde33e74cb3;p=src%2Fapp-framework-main.git diff --git a/conf/CMakeLists.txt b/conf/CMakeLists.txt index 67f60a7..5f15dd6 100644 --- a/conf/CMakeLists.txt +++ b/conf/CMakeLists.txt @@ -1,5 +1,5 @@ ########################################################################### -# Copyright 2015 IoT.bzh +# Copyright 2015, 2016, 2017 IoT.bzh # # author: José Bollo # @@ -18,13 +18,29 @@ cmake_minimum_required(VERSION 2.8) -setc(SYSCONFDIR_DBUS_SYSTEM ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d) -setc(SYSCONFDIR_DBUS_USER ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/user.d) -setc(UNITDIR_SYSTEM ${CMAKE_INSTALL_LIBDIR}/systemd/system) -setc(UNITDIR_USER ${CMAKE_INSTALL_LIBDIR}/systemd/user) +configure_file(afm-launch.conf.in afm-launch.conf) +configure_file(afm-unit.conf.in afm-unit.conf) +configure_file(afm-unit-debug.conf.in afm-unit-debug.conf) +configure_file(afm-system-daemon.service.in afm-system-daemon.service) +configure_file(afm-user-daemon.service.in afm-user-daemon.service) -install(FILES afm-system-daemon.conf DESTINATION ${SYSCONFDIR_DBUS_SYSTEM}) -install(FILES afm-system-daemon.service DESTINATION ${UNITDIR_SYSTEM}) -install(FILES afm-user-daemon.conf DESTINATION ${SYSCONFDIR_DBUS_USER}) -install(FILES afm-user-daemon.service DESTINATION ${UNITDIR_USER}) +if(NOT USE_SDK) + set(SYSCONFDIR_DBUS_SYSTEM ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/system.d CACHE STRING "Path to dbus system configuration files") + set(SYSCONFDIR_DBUS_USER ${CMAKE_INSTALL_SYSCONFDIR}/dbus-1/session.d CACHE STRING "Path to dbus session configuration files") + set(UNITDIR_SYSTEM ${CMAKE_INSTALL_LIBDIR}/systemd/system CACHE STRING "Path to systemd system unit files") + set(UNITDIR_USER ${CMAKE_INSTALL_LIBDIR}/systemd/user CACHE STRING "Path to systemd system unit files") + + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/afm-system-daemon.conf DESTINATION ${SYSCONFDIR_DBUS_SYSTEM}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/afm-system-daemon.service DESTINATION ${UNITDIR_SYSTEM}) + install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/afm-user-daemon.conf DESTINATION ${SYSCONFDIR_DBUS_USER}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/afm-user-daemon.service DESTINATION ${UNITDIR_USER}) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/afm-launch.conf DESTINATION ${afm_confdir}) + install(DIRECTORY DESTINATION ${afm_confdir}/unit.env.d) + + if(AGL_DEVEL) + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/afm-unit-debug.conf DESTINATION ${afm_confdir} RENAME afm-unit.conf) + else() + install(FILES ${CMAKE_CURRENT_BINARY_DIR}/afm-unit.conf DESTINATION ${afm_confdir}) + endif() +endif()