From 7546e75b7c3b8ed0b5cfa11c9b9b45831ab34a53 Mon Sep 17 00:00:00 2001 From: Sander Vrijders Date: Tue, 5 Sep 2017 16:53:31 +0200 Subject: build: Add systemd unit on install This adds a systemd unit for the irmd on installation of Ouroboros. --- CMakeLists.txt | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'CMakeLists.txt') diff --git a/CMakeLists.txt b/CMakeLists.txt index d4060d5f..db583144 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -74,6 +74,14 @@ configure_file("${CMAKE_CURRENT_SOURCE_DIR}/ouroboros.pc.in" install(FILES "${CMAKE_CURRENT_BINARY_DIR}/ouroboros.pc" DESTINATION "usr/lib/pkgconfig") +if (IS_DIRECTORY "/usr/lib/systemd") + configure_file("${CMAKE_CURRENT_SOURCE_DIR}/irmd.service.in" + "${CMAKE_CURRENT_BINARY_DIR}/irmd.service" @ONLY) + + install(FILES "${CMAKE_CURRENT_BINARY_DIR}/irmd.service" + DESTINATION "usr/lib/systemd/system") +endif () + enable_testing() add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND}) -- cgit v1.2.3