File tree 5 files changed +29
-18
lines changed
5 files changed +29
-18
lines changed Original file line number Diff line number Diff line change @@ -7,23 +7,9 @@ if(SYSTEMD_USER_SERVICE AND SYSTEMD_SYSTEM_SERVICE)
7
7
endif ()
8
8
9
9
if (SYSTEMD_USER_SERVICE OR SYSTEMD_SYSTEM_SERVICE)
10
- find_package (PkgConfig)
11
- # Try to get the systemd directory for system/user units from the package
12
- # and fall back on upstream default without the '/usr' prefix
13
- pkg_check_modules(SYSTEMD systemd)
14
- if (SYSTEMD_FOUND)
15
- if (SYSTEMD_USER_SERVICE)
16
- pkg_get_variable(SD_UNITDIR systemd systemduserunitdir)
17
- elseif (SYSTEMD_SYSTEM_SERVICE)
18
- pkg_get_variable(SD_UNITDIR systemd systemdsystemunitdir)
19
- endif ()
20
- # else()
21
- # set(SD_UNITDIR "lib/systemd/user")
22
- endif ()
10
+ add_subdirectory (systemd)
11
+ endif ()
23
12
24
- configure_file (
25
- "${CMAKE_CURRENT_SOURCE_DIR} /ydotoold.service.in"
26
- "${PROJECT_BINARY_DIR} /ydotoold.service"
27
- @ONLY)
28
- install (FILES "${PROJECT_BINARY_DIR} /ydotoold.service" DESTINATION ${SD_UNITDIR} )
13
+ if (OPENRC)
14
+ add_subdirectory (openrc)
29
15
endif ()
Original file line number Diff line number Diff line change
1
+ # TBD
File renamed without changes.
Original file line number Diff line number Diff line change
1
+ find_package (PkgConfig)
2
+
3
+ # Try to get the systemd directory for system/user units from the package
4
+ # and fall back on upstream default without the '/usr' prefix
5
+ pkg_check_modules(SYSTEMD systemd)
6
+ if (SYSTEMD_FOUND)
7
+ if (SYSTEMD_USER_SERVICE)
8
+ pkg_get_variable(SD_UNITDIR systemd systemduserunitdir)
9
+ elseif (SYSTEMD_SYSTEM_SERVICE)
10
+ pkg_get_variable(SD_UNITDIR systemd systemdsystemunitdir)
11
+ endif ()
12
+ endif ()
13
+
14
+ if (NOT DEFINED SD_UNITDIR)
15
+ set (SD_UNITDIR "lib/systemd/user" )
16
+ endif ()
17
+
18
+ message ("Systemd service file is going to be installed at ${SD_UNITDIR} " )
19
+
20
+ configure_file (
21
+ "${CMAKE_CURRENT_SOURCE_DIR} /ydotoold.service.in"
22
+ "${PROJECT_BINARY_DIR} /ydotoold.service"
23
+ @ONLY)
24
+ install (FILES "${PROJECT_BINARY_DIR} /ydotoold.service" DESTINATION ${SD_UNITDIR} )
File renamed without changes.
You can’t perform that action at this time.
0 commit comments