File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -28,8 +28,15 @@ if(INSTALL_UDEV_RULE)
28
28
endif ()
29
29
if (INSTALL_SYSTEMD_SLEEP_SCRIPT)
30
30
configure_file (k290-fnkeyctl.sh.in ${CMAKE_CURRENT_BINARY_DIR} /k290-fnkeyctl.sh @ONLY)
31
- install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR} /k290-fnkeyctl.sh DESTINATION /usr/lib/systemd/system -sleep/)
31
+ if (IS_DIRECTORY /usr/lib/systemd/system -sleep/)
32
+ install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR} /k290-fnkeyctl.sh DESTINATION /usr/lib/systemd/system -sleep/)
33
+ endif ()
34
+ # some distributions (e.g. Ubuntu) patch systemd to use /lib/systemd/system-sleep/ instead
35
+ if (IS_DIRECTORY /lib/systemd/system -sleep/)
36
+ install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR} /k290-fnkeyctl.sh DESTINATION /lib/systemd/system -sleep/)
37
+ endif ()
32
38
endif ()
39
+
33
40
if (INSTALL_PM_UTILS_SLEEP_SCRIPT)
34
41
configure_file (20-k290.sh.in ${CMAKE_CURRENT_BINARY_DIR} /20-k290.sh @ONLY)
35
42
install (PROGRAMS ${CMAKE_CURRENT_BINARY_DIR} /20-k290.sh DESTINATION /etc/pm/sleep.d/)
You can’t perform that action at this time.
0 commit comments