summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rwxr-xr-xsrc/agent/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/agent/CMakeLists.txt b/src/agent/CMakeLists.txt
index 77638be..5588bdb 100755
--- a/src/agent/CMakeLists.txt
+++ b/src/agent/CMakeLists.txt
@@ -74,6 +74,11 @@ INSTALL(DIRECTORY ${CMAKE_SOURCE_DIR}/oma-ds-cfg DESTINATION /usr/share)
# install oma ds dbus file
INSTALL(FILES ${CMAKE_SOURCE_DIR}/com.samsung.omadsagent.service DESTINATION /usr/share/dbus-1/services)
+# install systemd unit
+INSTALL(FILES ${CMAKE_SOURCE_DIR}/oma-ds-agent.service DESTINATION /usr/lib/systemd/system)
+INSTALL(CODE "FILE(MAKE_DIRECTORY \$ENV{DESTDIR}/usr/lib/systemd/system/graphical.target.wants)")
+INSTALL(CODE "EXECUTE_PROCESS(COMMAND ln -sf ../oma-ds-agent.service . WORKING_DIRECTORY \$ENV{DESTDIR}/usr/lib/systemd/system/graphical.target.wants)")
+
# install booting script file
INSTALL(PROGRAMS ${CMAKE_SOURCE_DIR}/${PROJECT_NAME} DESTINATION /etc/init.d/)