Skip to content

Commit

Permalink
[build] allow disabling systemd service unit install
Browse files Browse the repository at this point in the history
Add `INSTALL_SYSTEMD_UNIT` which can explicitly be set to `false`
to disable installing the service unit even if systemd is available.

If not defined, it defaults to true, i.e. the systemed service unit
is created. As a result, this change is backwards compatible: it's
required to _opt-out_ of systemd unit installation.
  • Loading branch information
milas committed Dec 27, 2024
1 parent 9eb311d commit 44290c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ include(GNUInstallDirs)

pkg_check_modules(SYSTEMD systemd)

if(SYSTEMD_FOUND)
if(SYSTEMD_FOUND AND (NOT DEFINED INSTALL_SYSTEMD_UNIT OR INSTALL_SYSTEMD_UNIT))
pkg_get_variable(OTBR_SYSTEMD_UNIT_DIR systemd systemdsystemunitdir)
endif()

Expand Down

0 comments on commit 44290c4

Please sign in to comment.