1
0
mirror of https://github.com/ohwgiles/laminar.git synced 2024-10-27 20:34:20 +00:00

CMakeLists: Allow passing in the systemd unit dir

This is now necessary on centos, where /lib is a symlink to /usr/lib
This commit is contained in:
Oliver Giles 2018-05-14 21:09:23 +03:00
parent 180b5b7117
commit bfac7bc397
2 changed files with 3 additions and 2 deletions

View File

@ -97,6 +97,7 @@ if(BUILD_TESTS)
target_link_libraries(laminar-tests ${GTEST_BOTH_LIBRARIES} gmock capnp-rpc capnp kj-async kj pthread boost_filesystem boost_system sqlite3 z) target_link_libraries(laminar-tests ${GTEST_BOTH_LIBRARIES} gmock capnp-rpc capnp kj-async kj pthread boost_filesystem boost_system sqlite3 z)
endif() endif()
set(SYSTEMD_UNITDIR /lib/systemd/system CACHE PATH "Path to systemd unit files")
install(TARGETS laminard laminarc RUNTIME DESTINATION usr/bin) install(TARGETS laminard laminarc RUNTIME DESTINATION usr/bin)
install(FILES laminar.service DESTINATION lib/systemd/system) install(FILES laminar.service DESTINATION ${SYSTEMD_UNITDIR})
install(FILES laminar.conf DESTINATION etc) install(FILES laminar.conf DESTINATION etc)

View File

@ -56,7 +56,7 @@ Lightweight Continuous Integration Service
%prep %prep
%build %build
cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ %{_sourcedir}/laminar-$VERSION cmake3 -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/ -DSYSTEMD_UNITDIR=%{_unitdir} %{_sourcedir}/laminar-$VERSION
pwd pwd
make make