diff --git a/server/CMakeLists.txt b/server/CMakeLists.txt index 023a17ce..72333a52 100644 --- a/server/CMakeLists.txt +++ b/server/CMakeLists.txt @@ -132,6 +132,10 @@ target_link_libraries( nlohmann_json::nlohmann_json ) +configure_file(dist/wivrn.service.in wivrn.service) +install(FILES ${CMAKE_CURRENT_BINARY_DIR}/wivrn.service + DESTINATION lib/systemd/user/) + install(TARGETS wivrn-server) set_target_properties(${RUNTIME_TARGET} PROPERTIES EXCLUDE_FROM_ALL FALSE) diff --git a/server/dist/wivrn.service.in b/server/dist/wivrn.service.in new file mode 100644 index 00000000..41973933 --- /dev/null +++ b/server/dist/wivrn.service.in @@ -0,0 +1,6 @@ +[Unit] +Description=OpenXR streaming server + +[Service] +Type=simple +ExecStart=@CMAKE_INSTALL_PREFIX@/bin/wivrn-server