From e0e1879a0022f9e9668417fef21924f5a02c90b9 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Fri, 1 Dec 2023 16:57:54 -0600 Subject: [PATCH] Changes from OpenXR SDK 1.0.32.1 hotfix: Fix CMake build of loader on Universal Windows Platform Also fix Azure Pipelines CI. GitOrigin-RevId: 401db2742417b942e594e2717a39979ecdf1af8f --- HOTFIX | 1 + src/loader/CMakeLists.txt | 11 +++++++---- 2 files changed, 8 insertions(+), 4 deletions(-) create mode 100644 HOTFIX diff --git a/HOTFIX b/HOTFIX new file mode 100644 index 00000000..d00491fd --- /dev/null +++ b/HOTFIX @@ -0,0 +1 @@ +1 diff --git a/src/loader/CMakeLists.txt b/src/loader/CMakeLists.txt index e8237adb..89c9f2ca 100644 --- a/src/loader/CMakeLists.txt +++ b/src/loader/CMakeLists.txt @@ -205,6 +205,13 @@ elseif(WIN32) ) if(MSVC) + if(DYNAMIC_LOADER) + target_sources( + openxr_loader + PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/openxr-loader.def" + ) + endif() + if(DYNAMIC_LOADER AND NOT (CMAKE_SYSTEM_NAME STREQUAL "WindowsStore")) # If building DLLs, force static CRT linkage set_target_properties( @@ -212,10 +219,6 @@ elseif(WIN32) PROPERTIES MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>" ) - target_sources( - openxr_loader - PRIVATE "${CMAKE_CURRENT_SOURCE_DIR}/openxr-loader.def" - ) else() # WindowsStore (UWP) apps must be compiled with dynamic CRT linkage (default) # Otherwise for static libs, link the CRT dynamically