mirror of
https://gitlab.freedesktop.org/monado/monado.git
synced 2025-01-29 01:48:31 +00:00
ipc: make the pid filename, the socket filename, and the client library suffix customizable
This commit is contained in:
parent
86e31f54f3
commit
76dff0b42f
|
@ -311,6 +311,8 @@ option(XRT_BUILD_DRIVER_SIMULATED "Enable simulated driver" ON)
|
||||||
|
|
||||||
option(XRT_BUILD_SAMPLES "Enable compiling sample code implementations that will not be linked into any final targets" ON)
|
option(XRT_BUILD_SAMPLES "Enable compiling sample code implementations that will not be linked into any final targets" ON)
|
||||||
set(XRT_IPC_MSG_SOCK_FILENAME monado_comp_ipc CACHE STRING "Service socket filename")
|
set(XRT_IPC_MSG_SOCK_FILENAME monado_comp_ipc CACHE STRING "Service socket filename")
|
||||||
|
set(XRT_IPC_SERVICE_PID_FILENAME monado.pid CACHE STRING "Service pidfile filename")
|
||||||
|
set(XRT_OXR_RUNTIME_SUFFIX monado CACHE STRING "OpenXR client library suffix")
|
||||||
|
|
||||||
# cmake-format: on
|
# cmake-format: on
|
||||||
|
|
||||||
|
|
3
doc/changes/xrt/mr.1567.md
Normal file
3
doc/changes/xrt/mr.1567.md
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
Add `XRT_IPC_SERVICE_PID_FILE_NAME` cmake variable to configure the name of pid file.
|
||||||
|
|
||||||
|
Add `XRT_OXR_RUNTIME_SUFFIX` cmake variable to configure the suffix of the output openXR library.
|
|
@ -9,11 +9,10 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "xrt/xrt_config.h"
|
#include "xrt/xrt_config.h"
|
||||||
|
#include "xrt/xrt_config_build.h"
|
||||||
|
|
||||||
#ifdef XRT_OS_LINUX
|
#ifdef XRT_OS_LINUX
|
||||||
|
|
||||||
#define PID_FILE_NAME "monado.pid"
|
|
||||||
|
|
||||||
#ifdef XRT_HAVE_LIBBSD
|
#ifdef XRT_HAVE_LIBBSD
|
||||||
#include <bsd/libutil.h>
|
#include <bsd/libutil.h>
|
||||||
#endif
|
#endif
|
||||||
|
@ -28,7 +27,7 @@
|
||||||
XRT_MAYBE_UNUSED static inline int
|
XRT_MAYBE_UNUSED static inline int
|
||||||
get_pidfile_path(char *buf)
|
get_pidfile_path(char *buf)
|
||||||
{
|
{
|
||||||
int size = u_file_get_path_in_runtime_dir(PID_FILE_NAME, buf, PATH_MAX);
|
int size = u_file_get_path_in_runtime_dir(XRT_IPC_SERVICE_PID_FILENAME, buf, PATH_MAX);
|
||||||
if (size == -1) {
|
if (size == -1) {
|
||||||
U_LOG_W("Failed to determine runtime dir, not creating pidfile");
|
U_LOG_W("Failed to determine runtime dir, not creating pidfile");
|
||||||
return -1;
|
return -1;
|
||||||
|
|
|
@ -29,3 +29,4 @@
|
||||||
#cmakedefine XRT_FEATURE_CLIENT_DEBUG_GUI
|
#cmakedefine XRT_FEATURE_CLIENT_DEBUG_GUI
|
||||||
#cmakedefine XRT_FEATURE_WINDOW_PEEK
|
#cmakedefine XRT_FEATURE_WINDOW_PEEK
|
||||||
#cmakedefine XRT_IPC_MSG_SOCK_FILENAME "@XRT_IPC_MSG_SOCK_FILENAME@"
|
#cmakedefine XRT_IPC_MSG_SOCK_FILENAME "@XRT_IPC_MSG_SOCK_FILENAME@"
|
||||||
|
#cmakedefine XRT_IPC_SERVICE_PID_FILENAME "@XRT_IPC_SERVICE_PID_FILENAME@"
|
||||||
|
|
|
@ -4,8 +4,7 @@
|
||||||
######
|
######
|
||||||
# Create a loadable OpenXR driver.
|
# Create a loadable OpenXR driver.
|
||||||
|
|
||||||
set(RUNTIME_BARE_SUFFIX monado)
|
set(RUNTIME_SUFFIX _${XRT_OXR_RUNTIME_SUFFIX})
|
||||||
set(RUNTIME_SUFFIX _${RUNTIME_BARE_SUFFIX})
|
|
||||||
|
|
||||||
set(RUNTIME_TARGET
|
set(RUNTIME_TARGET
|
||||||
${RUNTIME_PREFIX}openxr${RUNTIME_SUFFIX}
|
${RUNTIME_PREFIX}openxr${RUNTIME_SUFFIX}
|
||||||
|
|
Loading…
Reference in a new issue