Skip to content

Commit 11eb254

Browse files
Biswa96rpavlik
authored andcommitted
cmake: Install pkgconfig file in mingw
1 parent c00a2d9 commit 11eb254

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
cmake: Install pkgconfig file in mingw

src/loader/CMakeLists.txt

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -167,11 +167,6 @@ if(CMAKE_SYSTEM_NAME STREQUAL "Linux")
167167
COMMAND ${CMAKE_COMMAND} -E create_symlink libopenxr_loader.so.${MAJOR}.${MINOR}.${PATCH}
168168
libopenxr_loader.so.${MAJOR}.${MINOR}
169169
)
170-
171-
set(XR_API_VERSION "${MAJOR}.${MINOR}")
172-
set(EXTRA_LIBS ${CMAKE_THREAD_LIBS_INIT})
173-
configure_file(openxr.pc.in openxr.pc @ONLY)
174-
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/openxr.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
175170
elseif(WIN32)
176171
if(MSVC)
177172
# WindowsStore (UWP) apps must be compiled with dynamic CRT linkage (default)
@@ -245,6 +240,13 @@ elseif(ANDROID)
245240
)
246241
endif()
247242

243+
if(NOT MSVC)
244+
set(XR_API_VERSION "${MAJOR}.${MINOR}")
245+
set(EXTRA_LIBS ${CMAKE_THREAD_LIBS_INIT})
246+
configure_file(openxr.pc.in openxr.pc @ONLY)
247+
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/openxr.pc" DESTINATION "${CMAKE_INSTALL_LIBDIR}/pkgconfig")
248+
endif()
249+
248250
# Copy loader to conformance_cli binary folder if built as dynamic
249251
if(DYNAMIC_LOADER AND BUILD_CONFORMANCE_CLI)
250252
add_custom_command(TARGET openxr_loader POST_BUILD

0 commit comments

Comments
 (0)