Skip to content

Commit 47d4022

Browse files
authored
Merge pull request #242 from rpavlik/public-include-dir-in-build
Ensure we expose the OpenXR headers in the build interface as well as the install interface.
2 parents a9e4ddf + c33d9c7 commit 47d4022

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
- issue.195.gh.OpenXR-SDK-Source
3+
- issue.1409.gl
4+
---
5+
Ensure we expose the OpenXR headers in the build-time interface of the loader, as well as the install-time interface, for use with FetchContent.cmake.

src/loader/CMakeLists.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,11 @@ set_source_files_properties(${LOADER_EXTERNAL_GEN_FILES} PROPERTIES GENERATED TR
9090
add_dependencies(openxr_loader generate_openxr_header xr_global_generated_files)
9191
target_include_directories(
9292
openxr_loader
93-
PRIVATE ${PROJECT_SOURCE_DIR}/src/common
93+
# for OpenXR headers
94+
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
95+
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>
9496

95-
# for OpenXR headers
96-
${PROJECT_SOURCE_DIR}/include
97-
${PROJECT_BINARY_DIR}/include
97+
PRIVATE ${PROJECT_SOURCE_DIR}/src/common
9898

9999
# for generated dispatch table, common_config.h
100100
${CMAKE_CURRENT_SOURCE_DIR}/..

0 commit comments

Comments
 (0)