diff --git a/CMakeLists.txt b/CMakeLists.txt index a731bf194..832457d42 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) 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 diff --git a/doc/changes/xrt/mr.1567.md b/doc/changes/xrt/mr.1567.md new file mode 100644 index 000000000..e38cd48e8 --- /dev/null +++ b/doc/changes/xrt/mr.1567.md @@ -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. diff --git a/src/xrt/auxiliary/util/u_process.c b/src/xrt/auxiliary/util/u_process.c index ed8c3b2af..2e0a4a595 100644 --- a/src/xrt/auxiliary/util/u_process.c +++ b/src/xrt/auxiliary/util/u_process.c @@ -9,11 +9,10 @@ */ #include "xrt/xrt_config.h" +#include "xrt/xrt_config_build.h" #ifdef XRT_OS_LINUX -#define PID_FILE_NAME "monado.pid" - #ifdef XRT_HAVE_LIBBSD #include #endif @@ -28,7 +27,7 @@ XRT_MAYBE_UNUSED static inline int 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) { U_LOG_W("Failed to determine runtime dir, not creating pidfile"); return -1; diff --git a/src/xrt/include/xrt/xrt_config_build.h.cmake_in b/src/xrt/include/xrt/xrt_config_build.h.cmake_in index e984174fe..38828a23b 100644 --- a/src/xrt/include/xrt/xrt_config_build.h.cmake_in +++ b/src/xrt/include/xrt/xrt_config_build.h.cmake_in @@ -29,3 +29,4 @@ #cmakedefine XRT_FEATURE_CLIENT_DEBUG_GUI #cmakedefine XRT_FEATURE_WINDOW_PEEK #cmakedefine XRT_IPC_MSG_SOCK_FILENAME "@XRT_IPC_MSG_SOCK_FILENAME@" +#cmakedefine XRT_IPC_SERVICE_PID_FILENAME "@XRT_IPC_SERVICE_PID_FILENAME@" diff --git a/src/xrt/targets/openxr/CMakeLists.txt b/src/xrt/targets/openxr/CMakeLists.txt index 57eff8225..d162c730e 100644 --- a/src/xrt/targets/openxr/CMakeLists.txt +++ b/src/xrt/targets/openxr/CMakeLists.txt @@ -4,8 +4,7 @@ ###### # Create a loadable OpenXR driver. -set(RUNTIME_BARE_SUFFIX monado) -set(RUNTIME_SUFFIX _${RUNTIME_BARE_SUFFIX}) +set(RUNTIME_SUFFIX _${XRT_OXR_RUNTIME_SUFFIX}) set(RUNTIME_TARGET ${RUNTIME_PREFIX}openxr${RUNTIME_SUFFIX}