Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
opendht
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Model registry
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
savoirfairelinux
opendht
Commits
13bb50b8
Commit
13bb50b8
authored
2 years ago
by
Adrien Béraud
Browse files
Options
Downloads
Patches
Plain Diff
CMake: handle missing SYSTEMD_UNIT_INSTALL_DIR
parent
d16d30c4
No related branches found
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
tools/CMakeLists.txt
+13
-6
13 additions, 6 deletions
tools/CMakeLists.txt
with
13 additions
and
6 deletions
tools/CMakeLists.txt
+
13
−
6
View file @
13bb50b8
...
...
@@ -46,23 +46,30 @@ if (OPENDHT_SYSTEMD)
message
(
"-- Using Systemd unit installation directory requested: "
${
OPENDHT_SYSTEMD_UNIT_FILE_LOCATION
}
)
set
(
SYSTEMD_UNIT_INSTALL_DIR
${
OPENDHT_SYSTEMD_UNIT_FILE_LOCATION
}
)
endif
()
string
(
REGEX REPLACE
"[
\t\n
]+"
""
SYSTEMD_UNIT_INSTALL_DIR
"
${
SYSTEMD_UNIT_INSTALL_DIR
}
"
)
set
(
systemdunitdir
"
${
SYSTEMD_UNIT_INSTALL_DIR
}
"
)
configure_file
(
systemd/dhtnode.service.in
systemd/dhtnode.service
@ONLY
)
if
(
SYSTEMD_UNIT_INSTALL_DIR
)
string
(
REGEX REPLACE
"[
\t\n
]+"
""
SYSTEMD_UNIT_INSTALL_DIR
"
${
SYSTEMD_UNIT_INSTALL_DIR
}
"
)
set
(
systemdunitdir
"
${
SYSTEMD_UNIT_INSTALL_DIR
}
"
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/systemd/dhtnode.service DESTINATION
${
systemdunitdir
}
)
install
(
FILES systemd/dhtnode.conf DESTINATION
${
sysconfdir
}
)
else
()
message
(
WARNING
"Systemd unit installation directory not found. The systemd unit won't be installed."
)
endif
()
if
(
OPENDHT_PYTHON
)
configure_file
(
systemd/dhtcluster.service.in
systemd/dhtcluster.service
@ONLY
)
if
(
SYSTEMD_UNIT_INSTALL_DIR
)
install
(
FILES
${
CMAKE_CURRENT_BINARY_DIR
}
/systemd/dhtcluster.service DESTINATION
${
systemdunitdir
}
)
install
(
FILES systemd/dhtcluster.conf DESTINATION
${
sysconfdir
}
)
endif
()
endif
()
endif
()
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment