The open source OpenXR runtime

xrt: Set runtime descriptions from CMake

authored by

quic_yaommo and committed by
Jakob Bornecrantz
0bf275da 5b573b0a

+6 -2
+1
CMakeLists.txt
··· 6 6 XRT 7 7 VERSION 21.0.0 8 8 LANGUAGES C CXX 9 + DESCRIPTION "Monado(XRT) by Collabora et al" 9 10 ) 10 11 11 12 # CMake 3.11 introduced CMP0072 - Prefer GLVND
+2
src/xrt/auxiliary/util/u_git_tag.c.in
··· 14 14 #define MAJOR_VERSION @CMAKE_PROJECT_VERSION_MAJOR@ 15 15 #define MINOR_VERSION @CMAKE_PROJECT_VERSION_MINOR@ 16 16 #define PATCH_VERSION @CMAKE_PROJECT_VERSION_PATCH@ 17 + #define RUNTIME_DESCRIPTION "@CMAKE_PROJECT_DESCRIPTION@" 17 18 18 19 const char u_git_tag[] = GIT_DESC; 19 20 const uint16_t u_version_major = MAJOR_VERSION; 20 21 const uint16_t u_version_minor = MINOR_VERSION; 21 22 const uint16_t u_version_patch = PATCH_VERSION; 23 + const char u_runtime_description[] = RUNTIME_DESCRIPTION;
+1
src/xrt/auxiliary/util/u_git_tag.h
··· 20 20 extern const uint16_t u_version_major; 21 21 extern const uint16_t u_version_minor; 22 22 extern const uint16_t u_version_patch; 23 + extern const char u_runtime_description[]; 23 24 24 25 25 26 #ifdef __cplusplus
+1 -1
src/xrt/ipc/server/ipc_server_process.c
··· 899 899 { 900 900 struct ipc_server *s = U_TYPED_CALLOC(struct ipc_server); 901 901 902 - U_LOG_I("Monado Service %s starting up...", u_git_tag); 902 + U_LOG_I("%s '%s' starting up...", u_runtime_description, u_git_tag); 903 903 904 904 // need to create early before any vars are added 905 905 u_debug_gui_create(&s->debug_gui);
+1 -1
src/xrt/state_trackers/oxr/oxr_instance.c
··· 445 445 oxr_instance_get_properties(struct oxr_logger *log, struct oxr_instance *inst, XrInstanceProperties *instanceProperties) 446 446 { 447 447 instanceProperties->runtimeVersion = XR_MAKE_VERSION(u_version_major, u_version_minor, u_version_patch); 448 - snprintf(instanceProperties->runtimeName, XR_MAX_RUNTIME_NAME_SIZE - 1, "Monado(XRT) by Collabora et al '%s'", 448 + snprintf(instanceProperties->runtimeName, XR_MAX_RUNTIME_NAME_SIZE - 1, "%s '%s'", u_runtime_description, 449 449 u_git_tag); 450 450 451 451 return XR_SUCCESS;