Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MinGW build fix #362

Merged
merged 3 commits into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changes/sdk/pr.362.gh.OpenXR-SDK-Source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Loader: Fix dynamic build on MinGW.
4 changes: 2 additions & 2 deletions src/loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ run_xr_xml_generate(loader_source_generator.py xr_generated_loader.cpp)
if(DYNAMIC_LOADER)
add_definitions(-DXRAPI_DLL_EXPORT)
set(LIBRARY_TYPE SHARED)
if(WIN32)
if(MSVC)
list(APPEND openxr_loader_RESOURCE_FILE ${CMAKE_CURRENT_SOURCE_DIR}/openxr-loader.def)
endif()
else() # build static lib
Expand Down Expand Up @@ -335,7 +335,7 @@ install(
COMPONENT CMakeConfigs
)

if(WIN32 AND DYNAMIC_LOADER)
if(WIN32 AND NOT MINGW AND DYNAMIC_LOADER)
install(FILES $<TARGET_PDB_FILE:openxr_loader> DESTINATION ${CMAKE_INSTALL_BINDIR} OPTIONAL)
endif()

Expand Down