added systemd-units/mbusd@.service.in as installation target

This commit is contained in:
Nick 2017-11-29 16:46:36 +01:00
parent d6cec7305b
commit 1a7f6f32a4

View File

@ -53,6 +53,15 @@ if(LIB_UTIL AND HAVE_TTY_GET_NAME AND HAVE_UU_LOCK)
add_definitions(-DHAVE_LIBUTIL)
endif()
find_program(HAVE_SYSTEMD NAMES systemd)
if(HAVE_SYSTEMD)
set(bindir ${CMAKE_INSTALL_FULL_BINDIR})
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/systemd-units/mbusd@.service.in mbusd@service)
install(FILES mbusd.service DESTINATION /usr/lib/systemd/user/)
#TODO install a default ${CMAKE_CURRENT_SOURCE_DIR}/conf/mbusd.conf ??
endif()
set(mbusd_SOURCES
src/main.c