diff options
Diffstat (limited to 'systemd')
-rw-r--r-- | systemd/CMakeLists.txt | 50 |
1 files changed, 25 insertions, 25 deletions
diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt index fd050b0..71f0aa9 100644 --- a/systemd/CMakeLists.txt +++ b/systemd/CMakeLists.txt @@ -29,42 +29,42 @@ if(WITH_SYSTEMD) configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt.service) message( STATUS "Configured systemd unit file:dlt.service" ) + install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} ) - configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt-system.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt-system.service) - message( STATUS "Configured systemd unit file:dlt-system.service" ) + if(WITH_DLT_SYSTEM) + configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt-system.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt-system.service) + message( STATUS "Configured systemd unit file:dlt-system.service" ) + install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-system.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} ) + endif(WITH_DLT_SYSTEM) if(WITH_DLT_DBUS) configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt-dbus.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt-dbus.service) message( STATUS "Configured systemd unit file:dlt-dbus.service" ) + install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-dbus.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} ) endif(WITH_DLT_DBUS) - configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt-receive.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt-receive.service) - message( STATUS "Configured systemd unit file:dlt-receive.service" ) - - configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt-example-user.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt-example-user.service) - message( STATUS "Configured systemd unit file:dlt-example-user.service" ) - - set( DLT_ADAPTOR_UDP_APPID "DUDP" ) - set( DLT_ADAPTOR_UDP_CTID "DCTI" ) - set( DLT_ADAPTOR_UDP_PORT 4712 ) - configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt-adaptor-udp.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt-adaptor-udp.service) - message( STATUS "Configured systemd unit file:dlt-adaptor-udp.service" ) - message(STATUS "DLT adaptor udp configuration: APPID=${DLT_ADAPTOR_UDP_APPID} CTID=${DLT_ADAPTOR_UDP_CTID} PORT=${DLT_ADAPTOR_UDP_PORT}" ) - - - install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} ) - install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-system.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} ) - install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-receive.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} ) - - if(WITH_DLT_DBUS) - install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-dbus.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} ) - endif(WITH_DLT_DBUS) + if(WITH_DLT_CONSOLE AND WITH_DLT_EXAMPLES) + configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt-receive.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt-receive.service) + message( STATUS "Configured systemd unit file:dlt-receive.service" ) + install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-receive.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} ) + endif(WITH_DLT_CONSOLE AND WITH_DLT_EXAMPLES) if(WITH_DLT_EXAMPLES) - install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-example-user.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} ) + configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt-example-user.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt-example-user.service) + message( STATUS "Configured systemd unit file:dlt-example-user.service" ) + install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-example-user.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} ) endif(WITH_DLT_EXAMPLES) - install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-adaptor-udp.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} ) + if(WITH_DLT_ADAPTOR) + set( DLT_ADAPTOR_UDP_APPID "DUDP" ) + set( DLT_ADAPTOR_UDP_CTID "DCTI" ) + set( DLT_ADAPTOR_UDP_PORT 4712 ) + configure_file(${CMAKE_SOURCE_DIR}/systemd/dlt-adaptor-udp.service.cmake ${PROJECT_BINARY_DIR}/systemd/dlt-adaptor-udp.service) + message( STATUS "Configured systemd unit file:dlt-adaptor-udp.service" ) + message(STATUS "DLT adaptor udp configuration: APPID=${DLT_ADAPTOR_UDP_APPID} CTID=${DLT_ADAPTOR_UDP_CTID} PORT=${DLT_ADAPTOR_UDP_PORT}" ) + install(FILES ${PROJECT_BINARY_DIR}/systemd/dlt-adaptor-udp.service DESTINATION ${SYSTEMD_CONFIGURATIONS_FILES_DIR} ) + endif(WITH_DLT_ADAPTOR) + message(STATUS "Unit files will be installed to ${SYSTEMD_CONFIGURATIONS_FILES_DIR} after make install" ) endif(WITH_SYSTEMD) |