Skip to content

Commit

Permalink
OpenXR SDK 1.0.32.1 hotfix: Fix CMake build of loader on Universal Wi…
Browse files Browse the repository at this point in the history
…ndows Platform

Also fix Azure Pipelines CI.

GitOrigin-RevId: 401db2742417b942e594e2717a39979ecdf1af8f
  • Loading branch information
rpavlik committed Dec 1, 2023
1 parent 33c4600 commit e93034a
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 9 deletions.
8 changes: 3 additions & 5 deletions .azure-pipelines/shared/build_linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,13 @@ parameters:
default: ""
- name: sourceDir
type: string
default: "$(System.DefaultWorkingDirectory)"
default: "$(Pipeline.Workspace)"
- name: buildDir
type: string
default: build
default: "$(Build.BinariesDirectory)"

steps:
- checkout: self
lfs: true
- script: "rm -rf ${{ parameters.sourceDir }}/${{ parameters.buildDir }}"
- script: "rm -rf ${{ parameters.buildDir }}"
displayName: "Clean up build directory"

- script: "cmake -G Ninja -S . -B ${{ parameters.buildDir }} -DCMAKE_BUILD_TYPE=${{ parameters.buildType }} ${{ parameters.cmakeArgs }}"
Expand Down
1 change: 1 addition & 0 deletions HOTFIX
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
1 change: 1 addition & 0 deletions changes/sdk/mr.3071.gl.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Loader: Fix loader build on Universal Windows Platform: build-system-only change. (Included in SDK hotfix 1.0.32.1.)
11 changes: 7 additions & 4 deletions src/loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -205,17 +205,20 @@ 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(
openxr_loader
PROPERTIES MSVC_RUNTIME_LIBRARY
"MultiThreaded$<$<CONFIG:Debug>: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
Expand Down

0 comments on commit e93034a

Please sign in to comment.