Skip to content

Commit

Permalink
Merge pull request #242 from rpavlik/public-include-dir-in-build
Browse files Browse the repository at this point in the history
Ensure we expose the OpenXR headers in the build interface as well as the install interface.
  • Loading branch information
rpavlik authored Mar 5, 2021
2 parents a9e4ddf + c33d9c7 commit 47d4022
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 5 additions & 0 deletions changes/sdk/pr.242.gh.OpenXR-SDK-Source.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
- issue.195.gh.OpenXR-SDK-Source
- issue.1409.gl
---
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.
8 changes: 4 additions & 4 deletions src/loader/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -90,11 +90,11 @@ set_source_files_properties(${LOADER_EXTERNAL_GEN_FILES} PROPERTIES GENERATED TR
add_dependencies(openxr_loader generate_openxr_header xr_global_generated_files)
target_include_directories(
openxr_loader
PRIVATE ${PROJECT_SOURCE_DIR}/src/common
# for OpenXR headers
PUBLIC $<BUILD_INTERFACE:${PROJECT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${PROJECT_BINARY_DIR}/include>

# for OpenXR headers
${PROJECT_SOURCE_DIR}/include
${PROJECT_BINARY_DIR}/include
PRIVATE ${PROJECT_SOURCE_DIR}/src/common

# for generated dispatch table, common_config.h
${CMAKE_CURRENT_SOURCE_DIR}/..
Expand Down

0 comments on commit 47d4022

Please sign in to comment.