Skip to content

Commit 3ddb956

Browse files
Rename CMake module export to OpenXR. Add export target that countains only headers
1 parent 5ba16a8 commit 3ddb956

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/loader/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -249,7 +249,7 @@ install(TARGETS openxr-all-supported EXPORT openxr_loader_export)
249249
export(
250250
EXPORT openxr_loader_export
251251
FILE ${CMAKE_CURRENT_BINARY_DIR}/OpenXRTargets.cmake
252-
NAMESPACE xr::
252+
NAMESPACE OpenXR::
253253
)
254254

255255
if(CMAKE_SYSTEM_NAME STREQUAL "Windows")
@@ -261,7 +261,7 @@ endif()
261261
install(
262262
EXPORT openxr_loader_export
263263
FILE OpenXRTargets.cmake
264-
NAMESPACE xr::
264+
NAMESPACE OpenXR::
265265
DESTINATION ${TARGET_DESTINATION}
266266
)
267267

src/loader/OpenXRConfig.cmake.in

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
# The header openxr.h is not added to the export target so we add the include directory here
55
include("${CMAKE_CURRENT_LIST_DIR}/OpenXRTargets.cmake")
66
set_and_check(OpenXR_INCLUDE_DIR "@PACKAGE_INCLUDE_INSTALL_DIR@")
7-
target_include_directories(xr::openxr_loader INTERFACE ${OpenXR_INCLUDE_DIR})
7+
target_include_directories(OpenXR::openxr_loader INTERFACE ${OpenXR_INCLUDE_DIR})
8+
9+
add_library(OpenXR::headers INTERFACE IMPORTED)
10+
target_include_directories(OpenXR::headers SYSTEM INTERFACE ${OpenXR_INCLUDE_DIR})
811

912
check_required_components(OpenXR)

0 commit comments

Comments
 (0)