From c33d9c755806a9bb89c9f8946ee4ddf8c7819955 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Thu, 4 Mar 2021 13:42:37 -0600 Subject: [PATCH] Ensure we expose the OpenXR headers in the build interface as well as the install interface. --- changes/sdk/pr.242.gh.OpenXR-SDK-Source.md | 5 +++++ src/loader/CMakeLists.txt | 8 ++++---- 2 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 changes/sdk/pr.242.gh.OpenXR-SDK-Source.md diff --git a/changes/sdk/pr.242.gh.OpenXR-SDK-Source.md b/changes/sdk/pr.242.gh.OpenXR-SDK-Source.md new file mode 100644 index 000000000..64173e66d --- /dev/null +++ b/changes/sdk/pr.242.gh.OpenXR-SDK-Source.md @@ -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. diff --git a/src/loader/CMakeLists.txt b/src/loader/CMakeLists.txt index cfc208ea5..b386fb90d 100644 --- a/src/loader/CMakeLists.txt +++ b/src/loader/CMakeLists.txt @@ -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 $ + $ - # 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}/..