]> git.apps.os.sepia.ceph.com Git - ceph-ci.git/commitdiff
cmake: install systemd files
authorKefu Chai <kchai@redhat.com>
Thu, 30 Jun 2016 08:01:08 +0000 (16:01 +0800)
committerKefu Chai <kchai@redhat.com>
Thu, 30 Jun 2016 11:27:43 +0000 (19:27 +0800)
add an option "WITH_SYSTEMD", off by default

Signed-off-by: Kefu Chai <kchai@redhat.com>
CMakeLists.txt
systemd/CMakeLists.txt [new file with mode: 0644]

index 7da12959b0b41722b57fab4f9a569cb3c69ff411..acd4b38144986b8597cea3a6ba756388dc8e6cb6 100644 (file)
@@ -398,3 +398,9 @@ add_subdirectory(doc)
 if(WITH_MANPAGE)
   add_subdirectory(man)
 endif(WITH_MANPAGE)
+
+option(WITH_SYSTEMD "install systemd target and service files" OFF)
+if(WITH_SYSTEMD)
+  add_subdirectory(systemd)
+endif()
+
diff --git a/systemd/CMakeLists.txt b/systemd/CMakeLists.txt
new file mode 100644 (file)
index 0000000..31767d6
--- /dev/null
@@ -0,0 +1,16 @@
+install(FILES
+  ceph.target
+  ceph-osd.target
+  ceph-mon.target
+  ceph-mds.target
+  ceph-radosgw.target
+  ceph-rbd-mirror.target
+  ceph-mds@.service
+  ceph-mon@.service
+  ceph-create-keys@.service
+  ceph-osd@.service
+  ceph-radosgw@.service
+  ceph-rbd-mirror@.service
+  ceph-disk@.service
+  rbdmap.service
+  DESTINATION ${CMAKE_INSTALL_LIBEXECDIR}/systemd/system)