From 974c68dead2a3f51e3c24d7dcb752a0974c48f98 Mon Sep 17 00:00:00 2001 From: Ryan Pavlik Date: Tue, 31 Mar 2020 14:59:02 -0500 Subject: [PATCH] xrt: Re-arrange build to avoid unnecessary includes. Avoid unintentionally including cJSON from the source tree when using system, etc. This adds granularity to the usage of "external" sources. --- src/CMakeLists.txt | 6 +-- src/external/CMakeLists.txt | 18 +++++++ src/external/cjson/{ => cjson}/CHANGELOG.md | 0 .../cjson/{ => cjson}/CONTRIBUTORS.md | 0 src/external/cjson/{ => cjson}/LICENSE | 0 src/external/cjson/{ => cjson}/cJSON.c | 0 src/external/cjson/{ => cjson}/cJSON.h | 0 .../AbsoluteOrientationMeasurement.h | 0 .../AbsolutePositionLeverArmMeasurement.h | 0 .../AbsolutePositionMeasurement.h | 0 .../AngularVelocityMeasurement.h | 0 .../{ => flexkalman}/AugmentedProcessModel.h | 0 .../{ => flexkalman}/AugmentedState.h | 0 .../flexkalman/{ => flexkalman}/BaseTypes.h | 0 .../{ => flexkalman}/ConstantProcess.h | 0 .../EigenQuatExponentialMap.h | 0 .../{ => flexkalman}/ExternalQuaternion.h | 0 .../{ => flexkalman}/FlexibleKalmanBase.h | 0 .../{ => flexkalman}/FlexibleKalmanCorrect.h | 0 .../{ => flexkalman}/FlexibleKalmanFilter.h | 0 .../{ => flexkalman}/FlexibleKalmanMeta.h | 0 .../FlexibleUnscentedCorrect.h | 0 .../{ => flexkalman}/MatrixExponentialMap.h | 0 .../OrientationConstantVelocity.h | 0 .../{ => flexkalman}/OrientationState.h | 0 .../{ => flexkalman}/PoseConstantVelocity.h | 0 .../PoseConstantVelocityGeneric.h | 0 .../PoseDampedConstantVelocity.h | 0 .../PoseSeparatelyDampedConstantVelocity.h | 0 .../flexkalman/{ => flexkalman}/PoseState.h | 0 .../PoseStateExponentialMap.h | 0 .../{ => flexkalman}/PureVectorState.h | 0 .../flexkalman/{ => flexkalman}/README.md | 0 .../flexkalman/{ => flexkalman}/SO3.h | 0 .../{ => flexkalman}/SigmaPointGenerator.h | 0 src/external/glad/{ => glad}/gl.c | 0 src/external/glad/{ => glad}/gl.h | 0 .../imgui/{ => imgui}/LICENSE.cimgui.txt | 0 .../imgui/{ => imgui}/LICENSE.imgui.txt | 0 src/external/imgui/{ => imgui}/cimgui.cpp | 0 src/external/imgui/{ => imgui}/cimgui.h | 0 src/external/imgui/{ => imgui}/cimgui_sdl.cpp | 4 +- src/external/imgui/{ => imgui}/imconfig.h | 0 src/external/imgui/{ => imgui}/imgui.cpp | 0 src/external/imgui/{ => imgui}/imgui.h | 0 src/external/imgui/{ => imgui}/imgui_demo.cpp | 0 src/external/imgui/{ => imgui}/imgui_draw.cpp | 0 .../imgui/{ => imgui}/imgui_impl_opengl3.cpp | 0 .../imgui/{ => imgui}/imgui_impl_opengl3.h | 0 .../imgui/{ => imgui}/imgui_impl_sdl.cpp | 0 .../imgui/{ => imgui}/imgui_impl_sdl.h | 0 .../imgui/{ => imgui}/imgui_internal.h | 0 .../imgui/{ => imgui}/imgui_widgets.cpp | 0 .../imgui/{ => imgui}/imstb_rectpack.h | 0 .../imgui/{ => imgui}/imstb_textedit.h | 0 .../imgui/{ => imgui}/imstb_truetype.h | 0 .../{ => imgui}/imgui_monado/cimgui_monado.h | 0 .../{ => imgui}/imgui_monado/imgui_monado.cpp | 0 src/external/meson.build | 9 +++- .../{ => openxr}/loader_interfaces.h | 2 +- .../openxr_includes/{ => openxr}/openxr.h | 0 .../{ => openxr}/openxr_platform.h | 0 .../{ => openxr}/openxr_platform_defines.h | 0 .../{ => openxr}/openxr_reflection.h | 0 src/xrt/auxiliary/CMakeLists.txt | 17 ++++--- src/xrt/auxiliary/meson.build | 7 ++- src/xrt/compositor/meson.build | 7 ++- src/xrt/drivers/CMakeLists.txt | 4 +- src/xrt/drivers/meson.build | 10 +++- src/xrt/include/xrt/xrt_openxr_includes.h | 6 +-- src/xrt/state_trackers/CMakeLists.txt | 4 +- src/xrt/state_trackers/gui/CMakeLists.txt | 47 ++++++++++--------- src/xrt/state_trackers/gui/meson.build | 38 ++++++++------- src/xrt/state_trackers/oxr/CMakeLists.txt | 2 +- src/xrt/state_trackers/oxr/meson.build | 4 +- src/xrt/state_trackers/oxr/oxr_api_instance.c | 4 +- src/xrt/state_trackers/oxr/oxr_logger.c | 2 +- src/xrt/state_trackers/prober/meson.build | 4 +- src/xrt/targets/gui/meson.build | 11 +++-- src/xrt/targets/openxr/meson.build | 20 ++++---- 80 files changed, 131 insertions(+), 95 deletions(-) create mode 100644 src/external/CMakeLists.txt rename src/external/cjson/{ => cjson}/CHANGELOG.md (100%) rename src/external/cjson/{ => cjson}/CONTRIBUTORS.md (100%) rename src/external/cjson/{ => cjson}/LICENSE (100%) rename src/external/cjson/{ => cjson}/cJSON.c (100%) rename src/external/cjson/{ => cjson}/cJSON.h (100%) rename src/external/flexkalman/{ => flexkalman}/AbsoluteOrientationMeasurement.h (100%) rename src/external/flexkalman/{ => flexkalman}/AbsolutePositionLeverArmMeasurement.h (100%) rename src/external/flexkalman/{ => flexkalman}/AbsolutePositionMeasurement.h (100%) rename src/external/flexkalman/{ => flexkalman}/AngularVelocityMeasurement.h (100%) rename src/external/flexkalman/{ => flexkalman}/AugmentedProcessModel.h (100%) rename src/external/flexkalman/{ => flexkalman}/AugmentedState.h (100%) rename src/external/flexkalman/{ => flexkalman}/BaseTypes.h (100%) rename src/external/flexkalman/{ => flexkalman}/ConstantProcess.h (100%) rename src/external/flexkalman/{ => flexkalman}/EigenQuatExponentialMap.h (100%) rename src/external/flexkalman/{ => flexkalman}/ExternalQuaternion.h (100%) rename src/external/flexkalman/{ => flexkalman}/FlexibleKalmanBase.h (100%) rename src/external/flexkalman/{ => flexkalman}/FlexibleKalmanCorrect.h (100%) rename src/external/flexkalman/{ => flexkalman}/FlexibleKalmanFilter.h (100%) rename src/external/flexkalman/{ => flexkalman}/FlexibleKalmanMeta.h (100%) rename src/external/flexkalman/{ => flexkalman}/FlexibleUnscentedCorrect.h (100%) rename src/external/flexkalman/{ => flexkalman}/MatrixExponentialMap.h (100%) rename src/external/flexkalman/{ => flexkalman}/OrientationConstantVelocity.h (100%) rename src/external/flexkalman/{ => flexkalman}/OrientationState.h (100%) rename src/external/flexkalman/{ => flexkalman}/PoseConstantVelocity.h (100%) rename src/external/flexkalman/{ => flexkalman}/PoseConstantVelocityGeneric.h (100%) rename src/external/flexkalman/{ => flexkalman}/PoseDampedConstantVelocity.h (100%) rename src/external/flexkalman/{ => flexkalman}/PoseSeparatelyDampedConstantVelocity.h (100%) rename src/external/flexkalman/{ => flexkalman}/PoseState.h (100%) rename src/external/flexkalman/{ => flexkalman}/PoseStateExponentialMap.h (100%) rename src/external/flexkalman/{ => flexkalman}/PureVectorState.h (100%) rename src/external/flexkalman/{ => flexkalman}/README.md (100%) rename src/external/flexkalman/{ => flexkalman}/SO3.h (100%) rename src/external/flexkalman/{ => flexkalman}/SigmaPointGenerator.h (100%) rename src/external/glad/{ => glad}/gl.c (100%) rename src/external/glad/{ => glad}/gl.h (100%) rename src/external/imgui/{ => imgui}/LICENSE.cimgui.txt (100%) rename src/external/imgui/{ => imgui}/LICENSE.imgui.txt (100%) rename src/external/imgui/{ => imgui}/cimgui.cpp (100%) rename src/external/imgui/{ => imgui}/cimgui.h (100%) rename src/external/imgui/{ => imgui}/cimgui_sdl.cpp (92%) rename src/external/imgui/{ => imgui}/imconfig.h (100%) rename src/external/imgui/{ => imgui}/imgui.cpp (100%) rename src/external/imgui/{ => imgui}/imgui.h (100%) rename src/external/imgui/{ => imgui}/imgui_demo.cpp (100%) rename src/external/imgui/{ => imgui}/imgui_draw.cpp (100%) rename src/external/imgui/{ => imgui}/imgui_impl_opengl3.cpp (100%) rename src/external/imgui/{ => imgui}/imgui_impl_opengl3.h (100%) rename src/external/imgui/{ => imgui}/imgui_impl_sdl.cpp (100%) rename src/external/imgui/{ => imgui}/imgui_impl_sdl.h (100%) rename src/external/imgui/{ => imgui}/imgui_internal.h (100%) rename src/external/imgui/{ => imgui}/imgui_widgets.cpp (100%) rename src/external/imgui/{ => imgui}/imstb_rectpack.h (100%) rename src/external/imgui/{ => imgui}/imstb_textedit.h (100%) rename src/external/imgui/{ => imgui}/imstb_truetype.h (100%) rename src/external/{ => imgui}/imgui_monado/cimgui_monado.h (100%) rename src/external/{ => imgui}/imgui_monado/imgui_monado.cpp (100%) rename src/external/openxr_includes/{ => openxr}/loader_interfaces.h (99%) rename src/external/openxr_includes/{ => openxr}/openxr.h (100%) rename src/external/openxr_includes/{ => openxr}/openxr_platform.h (100%) rename src/external/openxr_includes/{ => openxr}/openxr_platform_defines.h (100%) rename src/external/openxr_includes/{ => openxr}/openxr_reflection.h (100%) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 4d8bd5416..cfb4ded1f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,9 +1,5 @@ # Copyright 2019-2020, Collabora, Ltd. # SPDX-License-Identifier: BSL-1.0 -# "Link" against this interface target if your module -# uses the files in "external". -add_library(xrt-external-headers INTERFACE) -target_include_directories(xrt-external-headers SYSTEM INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/external) - +add_subdirectory(external) add_subdirectory(xrt) diff --git a/src/external/CMakeLists.txt b/src/external/CMakeLists.txt new file mode 100644 index 000000000..742a06f75 --- /dev/null +++ b/src/external/CMakeLists.txt @@ -0,0 +1,18 @@ +# Copyright 2020, Collabora, Ltd. +# SPDX-License-Identifier: BSL-1.0 + +add_library(xrt-external-openxr INTERFACE) +target_include_directories(xrt-external-openxr INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/openxr_includes) + +add_library(xrt-external-glad INTERFACE) +target_include_directories(xrt-external-glad INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/glad) + +if(BUILD_WITH_SYSTEM_CJSON) + add_library(xrt-external-cjson ALIAS cJSON::cJSON) +else() + add_library(xrt-external-cjson INTERFACE) + target_include_directories(xrt-external-cjson INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/cjson) +endif() + +add_library(xrt-external-flexkalman INTERFACE) +target_include_directories(xrt-external-flexkalman INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/flexkalman) diff --git a/src/external/cjson/CHANGELOG.md b/src/external/cjson/cjson/CHANGELOG.md similarity index 100% rename from src/external/cjson/CHANGELOG.md rename to src/external/cjson/cjson/CHANGELOG.md diff --git a/src/external/cjson/CONTRIBUTORS.md b/src/external/cjson/cjson/CONTRIBUTORS.md similarity index 100% rename from src/external/cjson/CONTRIBUTORS.md rename to src/external/cjson/cjson/CONTRIBUTORS.md diff --git a/src/external/cjson/LICENSE b/src/external/cjson/cjson/LICENSE similarity index 100% rename from src/external/cjson/LICENSE rename to src/external/cjson/cjson/LICENSE diff --git a/src/external/cjson/cJSON.c b/src/external/cjson/cjson/cJSON.c similarity index 100% rename from src/external/cjson/cJSON.c rename to src/external/cjson/cjson/cJSON.c diff --git a/src/external/cjson/cJSON.h b/src/external/cjson/cjson/cJSON.h similarity index 100% rename from src/external/cjson/cJSON.h rename to src/external/cjson/cjson/cJSON.h diff --git a/src/external/flexkalman/AbsoluteOrientationMeasurement.h b/src/external/flexkalman/flexkalman/AbsoluteOrientationMeasurement.h similarity index 100% rename from src/external/flexkalman/AbsoluteOrientationMeasurement.h rename to src/external/flexkalman/flexkalman/AbsoluteOrientationMeasurement.h diff --git a/src/external/flexkalman/AbsolutePositionLeverArmMeasurement.h b/src/external/flexkalman/flexkalman/AbsolutePositionLeverArmMeasurement.h similarity index 100% rename from src/external/flexkalman/AbsolutePositionLeverArmMeasurement.h rename to src/external/flexkalman/flexkalman/AbsolutePositionLeverArmMeasurement.h diff --git a/src/external/flexkalman/AbsolutePositionMeasurement.h b/src/external/flexkalman/flexkalman/AbsolutePositionMeasurement.h similarity index 100% rename from src/external/flexkalman/AbsolutePositionMeasurement.h rename to src/external/flexkalman/flexkalman/AbsolutePositionMeasurement.h diff --git a/src/external/flexkalman/AngularVelocityMeasurement.h b/src/external/flexkalman/flexkalman/AngularVelocityMeasurement.h similarity index 100% rename from src/external/flexkalman/AngularVelocityMeasurement.h rename to src/external/flexkalman/flexkalman/AngularVelocityMeasurement.h diff --git a/src/external/flexkalman/AugmentedProcessModel.h b/src/external/flexkalman/flexkalman/AugmentedProcessModel.h similarity index 100% rename from src/external/flexkalman/AugmentedProcessModel.h rename to src/external/flexkalman/flexkalman/AugmentedProcessModel.h diff --git a/src/external/flexkalman/AugmentedState.h b/src/external/flexkalman/flexkalman/AugmentedState.h similarity index 100% rename from src/external/flexkalman/AugmentedState.h rename to src/external/flexkalman/flexkalman/AugmentedState.h diff --git a/src/external/flexkalman/BaseTypes.h b/src/external/flexkalman/flexkalman/BaseTypes.h similarity index 100% rename from src/external/flexkalman/BaseTypes.h rename to src/external/flexkalman/flexkalman/BaseTypes.h diff --git a/src/external/flexkalman/ConstantProcess.h b/src/external/flexkalman/flexkalman/ConstantProcess.h similarity index 100% rename from src/external/flexkalman/ConstantProcess.h rename to src/external/flexkalman/flexkalman/ConstantProcess.h diff --git a/src/external/flexkalman/EigenQuatExponentialMap.h b/src/external/flexkalman/flexkalman/EigenQuatExponentialMap.h similarity index 100% rename from src/external/flexkalman/EigenQuatExponentialMap.h rename to src/external/flexkalman/flexkalman/EigenQuatExponentialMap.h diff --git a/src/external/flexkalman/ExternalQuaternion.h b/src/external/flexkalman/flexkalman/ExternalQuaternion.h similarity index 100% rename from src/external/flexkalman/ExternalQuaternion.h rename to src/external/flexkalman/flexkalman/ExternalQuaternion.h diff --git a/src/external/flexkalman/FlexibleKalmanBase.h b/src/external/flexkalman/flexkalman/FlexibleKalmanBase.h similarity index 100% rename from src/external/flexkalman/FlexibleKalmanBase.h rename to src/external/flexkalman/flexkalman/FlexibleKalmanBase.h diff --git a/src/external/flexkalman/FlexibleKalmanCorrect.h b/src/external/flexkalman/flexkalman/FlexibleKalmanCorrect.h similarity index 100% rename from src/external/flexkalman/FlexibleKalmanCorrect.h rename to src/external/flexkalman/flexkalman/FlexibleKalmanCorrect.h diff --git a/src/external/flexkalman/FlexibleKalmanFilter.h b/src/external/flexkalman/flexkalman/FlexibleKalmanFilter.h similarity index 100% rename from src/external/flexkalman/FlexibleKalmanFilter.h rename to src/external/flexkalman/flexkalman/FlexibleKalmanFilter.h diff --git a/src/external/flexkalman/FlexibleKalmanMeta.h b/src/external/flexkalman/flexkalman/FlexibleKalmanMeta.h similarity index 100% rename from src/external/flexkalman/FlexibleKalmanMeta.h rename to src/external/flexkalman/flexkalman/FlexibleKalmanMeta.h diff --git a/src/external/flexkalman/FlexibleUnscentedCorrect.h b/src/external/flexkalman/flexkalman/FlexibleUnscentedCorrect.h similarity index 100% rename from src/external/flexkalman/FlexibleUnscentedCorrect.h rename to src/external/flexkalman/flexkalman/FlexibleUnscentedCorrect.h diff --git a/src/external/flexkalman/MatrixExponentialMap.h b/src/external/flexkalman/flexkalman/MatrixExponentialMap.h similarity index 100% rename from src/external/flexkalman/MatrixExponentialMap.h rename to src/external/flexkalman/flexkalman/MatrixExponentialMap.h diff --git a/src/external/flexkalman/OrientationConstantVelocity.h b/src/external/flexkalman/flexkalman/OrientationConstantVelocity.h similarity index 100% rename from src/external/flexkalman/OrientationConstantVelocity.h rename to src/external/flexkalman/flexkalman/OrientationConstantVelocity.h diff --git a/src/external/flexkalman/OrientationState.h b/src/external/flexkalman/flexkalman/OrientationState.h similarity index 100% rename from src/external/flexkalman/OrientationState.h rename to src/external/flexkalman/flexkalman/OrientationState.h diff --git a/src/external/flexkalman/PoseConstantVelocity.h b/src/external/flexkalman/flexkalman/PoseConstantVelocity.h similarity index 100% rename from src/external/flexkalman/PoseConstantVelocity.h rename to src/external/flexkalman/flexkalman/PoseConstantVelocity.h diff --git a/src/external/flexkalman/PoseConstantVelocityGeneric.h b/src/external/flexkalman/flexkalman/PoseConstantVelocityGeneric.h similarity index 100% rename from src/external/flexkalman/PoseConstantVelocityGeneric.h rename to src/external/flexkalman/flexkalman/PoseConstantVelocityGeneric.h diff --git a/src/external/flexkalman/PoseDampedConstantVelocity.h b/src/external/flexkalman/flexkalman/PoseDampedConstantVelocity.h similarity index 100% rename from src/external/flexkalman/PoseDampedConstantVelocity.h rename to src/external/flexkalman/flexkalman/PoseDampedConstantVelocity.h diff --git a/src/external/flexkalman/PoseSeparatelyDampedConstantVelocity.h b/src/external/flexkalman/flexkalman/PoseSeparatelyDampedConstantVelocity.h similarity index 100% rename from src/external/flexkalman/PoseSeparatelyDampedConstantVelocity.h rename to src/external/flexkalman/flexkalman/PoseSeparatelyDampedConstantVelocity.h diff --git a/src/external/flexkalman/PoseState.h b/src/external/flexkalman/flexkalman/PoseState.h similarity index 100% rename from src/external/flexkalman/PoseState.h rename to src/external/flexkalman/flexkalman/PoseState.h diff --git a/src/external/flexkalman/PoseStateExponentialMap.h b/src/external/flexkalman/flexkalman/PoseStateExponentialMap.h similarity index 100% rename from src/external/flexkalman/PoseStateExponentialMap.h rename to src/external/flexkalman/flexkalman/PoseStateExponentialMap.h diff --git a/src/external/flexkalman/PureVectorState.h b/src/external/flexkalman/flexkalman/PureVectorState.h similarity index 100% rename from src/external/flexkalman/PureVectorState.h rename to src/external/flexkalman/flexkalman/PureVectorState.h diff --git a/src/external/flexkalman/README.md b/src/external/flexkalman/flexkalman/README.md similarity index 100% rename from src/external/flexkalman/README.md rename to src/external/flexkalman/flexkalman/README.md diff --git a/src/external/flexkalman/SO3.h b/src/external/flexkalman/flexkalman/SO3.h similarity index 100% rename from src/external/flexkalman/SO3.h rename to src/external/flexkalman/flexkalman/SO3.h diff --git a/src/external/flexkalman/SigmaPointGenerator.h b/src/external/flexkalman/flexkalman/SigmaPointGenerator.h similarity index 100% rename from src/external/flexkalman/SigmaPointGenerator.h rename to src/external/flexkalman/flexkalman/SigmaPointGenerator.h diff --git a/src/external/glad/gl.c b/src/external/glad/glad/gl.c similarity index 100% rename from src/external/glad/gl.c rename to src/external/glad/glad/gl.c diff --git a/src/external/glad/gl.h b/src/external/glad/glad/gl.h similarity index 100% rename from src/external/glad/gl.h rename to src/external/glad/glad/gl.h diff --git a/src/external/imgui/LICENSE.cimgui.txt b/src/external/imgui/imgui/LICENSE.cimgui.txt similarity index 100% rename from src/external/imgui/LICENSE.cimgui.txt rename to src/external/imgui/imgui/LICENSE.cimgui.txt diff --git a/src/external/imgui/LICENSE.imgui.txt b/src/external/imgui/imgui/LICENSE.imgui.txt similarity index 100% rename from src/external/imgui/LICENSE.imgui.txt rename to src/external/imgui/imgui/LICENSE.imgui.txt diff --git a/src/external/imgui/cimgui.cpp b/src/external/imgui/imgui/cimgui.cpp similarity index 100% rename from src/external/imgui/cimgui.cpp rename to src/external/imgui/imgui/cimgui.cpp diff --git a/src/external/imgui/cimgui.h b/src/external/imgui/imgui/cimgui.h similarity index 100% rename from src/external/imgui/cimgui.h rename to src/external/imgui/imgui/cimgui.h diff --git a/src/external/imgui/cimgui_sdl.cpp b/src/external/imgui/imgui/cimgui_sdl.cpp similarity index 92% rename from src/external/imgui/cimgui_sdl.cpp rename to src/external/imgui/imgui/cimgui_sdl.cpp index 96aeb9f69..14dd332c6 100644 --- a/src/external/imgui/cimgui_sdl.cpp +++ b/src/external/imgui/imgui/cimgui_sdl.cpp @@ -1,7 +1,7 @@ -#include "./imgui/imgui.h" +#include "imgui.h" #include "cimgui.h" -#include "./imgui/imgui_internal.h" +#include "imgui_internal.h" #include "imgui_impl_sdl.h" diff --git a/src/external/imgui/imconfig.h b/src/external/imgui/imgui/imconfig.h similarity index 100% rename from src/external/imgui/imconfig.h rename to src/external/imgui/imgui/imconfig.h diff --git a/src/external/imgui/imgui.cpp b/src/external/imgui/imgui/imgui.cpp similarity index 100% rename from src/external/imgui/imgui.cpp rename to src/external/imgui/imgui/imgui.cpp diff --git a/src/external/imgui/imgui.h b/src/external/imgui/imgui/imgui.h similarity index 100% rename from src/external/imgui/imgui.h rename to src/external/imgui/imgui/imgui.h diff --git a/src/external/imgui/imgui_demo.cpp b/src/external/imgui/imgui/imgui_demo.cpp similarity index 100% rename from src/external/imgui/imgui_demo.cpp rename to src/external/imgui/imgui/imgui_demo.cpp diff --git a/src/external/imgui/imgui_draw.cpp b/src/external/imgui/imgui/imgui_draw.cpp similarity index 100% rename from src/external/imgui/imgui_draw.cpp rename to src/external/imgui/imgui/imgui_draw.cpp diff --git a/src/external/imgui/imgui_impl_opengl3.cpp b/src/external/imgui/imgui/imgui_impl_opengl3.cpp similarity index 100% rename from src/external/imgui/imgui_impl_opengl3.cpp rename to src/external/imgui/imgui/imgui_impl_opengl3.cpp diff --git a/src/external/imgui/imgui_impl_opengl3.h b/src/external/imgui/imgui/imgui_impl_opengl3.h similarity index 100% rename from src/external/imgui/imgui_impl_opengl3.h rename to src/external/imgui/imgui/imgui_impl_opengl3.h diff --git a/src/external/imgui/imgui_impl_sdl.cpp b/src/external/imgui/imgui/imgui_impl_sdl.cpp similarity index 100% rename from src/external/imgui/imgui_impl_sdl.cpp rename to src/external/imgui/imgui/imgui_impl_sdl.cpp diff --git a/src/external/imgui/imgui_impl_sdl.h b/src/external/imgui/imgui/imgui_impl_sdl.h similarity index 100% rename from src/external/imgui/imgui_impl_sdl.h rename to src/external/imgui/imgui/imgui_impl_sdl.h diff --git a/src/external/imgui/imgui_internal.h b/src/external/imgui/imgui/imgui_internal.h similarity index 100% rename from src/external/imgui/imgui_internal.h rename to src/external/imgui/imgui/imgui_internal.h diff --git a/src/external/imgui/imgui_widgets.cpp b/src/external/imgui/imgui/imgui_widgets.cpp similarity index 100% rename from src/external/imgui/imgui_widgets.cpp rename to src/external/imgui/imgui/imgui_widgets.cpp diff --git a/src/external/imgui/imstb_rectpack.h b/src/external/imgui/imgui/imstb_rectpack.h similarity index 100% rename from src/external/imgui/imstb_rectpack.h rename to src/external/imgui/imgui/imstb_rectpack.h diff --git a/src/external/imgui/imstb_textedit.h b/src/external/imgui/imgui/imstb_textedit.h similarity index 100% rename from src/external/imgui/imstb_textedit.h rename to src/external/imgui/imgui/imstb_textedit.h diff --git a/src/external/imgui/imstb_truetype.h b/src/external/imgui/imgui/imstb_truetype.h similarity index 100% rename from src/external/imgui/imstb_truetype.h rename to src/external/imgui/imgui/imstb_truetype.h diff --git a/src/external/imgui_monado/cimgui_monado.h b/src/external/imgui/imgui_monado/cimgui_monado.h similarity index 100% rename from src/external/imgui_monado/cimgui_monado.h rename to src/external/imgui/imgui_monado/cimgui_monado.h diff --git a/src/external/imgui_monado/imgui_monado.cpp b/src/external/imgui/imgui_monado/imgui_monado.cpp similarity index 100% rename from src/external/imgui_monado/imgui_monado.cpp rename to src/external/imgui/imgui_monado/imgui_monado.cpp diff --git a/src/external/meson.build b/src/external/meson.build index bc7f1a365..ae00768dd 100644 --- a/src/external/meson.build +++ b/src/external/meson.build @@ -1 +1,8 @@ -external_include = include_directories('.') +# Copyright 2019-2020, Collabora, Ltd. +# SPDX-License-Identifier: BSL-1.0 + +openxr_include = include_directories('openxr_includes') +cjson_include = include_directories('cjson') +flexkalman_include = include_directories('flexkalman') +glad_include = include_directories('glad') +imgui_include = include_directories('imgui') diff --git a/src/external/openxr_includes/loader_interfaces.h b/src/external/openxr_includes/openxr/loader_interfaces.h similarity index 99% rename from src/external/openxr_includes/loader_interfaces.h rename to src/external/openxr_includes/openxr/loader_interfaces.h index 6fbe73536..8a347dd15 100644 --- a/src/external/openxr_includes/loader_interfaces.h +++ b/src/external/openxr_includes/openxr/loader_interfaces.h @@ -19,7 +19,7 @@ #pragma once -#include +#include "openxr.h" #ifdef __cplusplus extern "C" { diff --git a/src/external/openxr_includes/openxr.h b/src/external/openxr_includes/openxr/openxr.h similarity index 100% rename from src/external/openxr_includes/openxr.h rename to src/external/openxr_includes/openxr/openxr.h diff --git a/src/external/openxr_includes/openxr_platform.h b/src/external/openxr_includes/openxr/openxr_platform.h similarity index 100% rename from src/external/openxr_includes/openxr_platform.h rename to src/external/openxr_includes/openxr/openxr_platform.h diff --git a/src/external/openxr_includes/openxr_platform_defines.h b/src/external/openxr_includes/openxr/openxr_platform_defines.h similarity index 100% rename from src/external/openxr_includes/openxr_platform_defines.h rename to src/external/openxr_includes/openxr/openxr_platform_defines.h diff --git a/src/external/openxr_includes/openxr_reflection.h b/src/external/openxr_includes/openxr/openxr_reflection.h similarity index 100% rename from src/external/openxr_includes/openxr_reflection.h rename to src/external/openxr_includes/openxr/openxr_reflection.h diff --git a/src/xrt/auxiliary/CMakeLists.txt b/src/xrt/auxiliary/CMakeLists.txt index 7791739c2..33cd3312b 100644 --- a/src/xrt/auxiliary/CMakeLists.txt +++ b/src/xrt/auxiliary/CMakeLists.txt @@ -112,11 +112,13 @@ add_library(aux-includes INTERFACE) target_include_directories(aux-includes INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}) target_link_libraries(aux-includes INTERFACE xrt-interfaces) -# OpenGL library. -add_library(aux_ogl STATIC ${OGL_SOURCE_FILES}) -target_link_libraries(aux_ogl PUBLIC aux-includes) -# for GLAD -target_link_libraries(aux_ogl PRIVATE xrt-external-headers) +if(BUILD_WITH_OPENGL) + # OpenGL library. + add_library(aux_ogl STATIC ${OGL_SOURCE_FILES}) + target_link_libraries(aux_ogl PUBLIC aux-includes) + # for GLAD + target_link_libraries(aux_ogl PUBLIC xrt-external-glad) +endif() # OS library. add_library(aux_os STATIC ${OS_SOURCE_FILES}) @@ -141,7 +143,6 @@ target_include_directories(aux_math SYSTEM # Util library. add_library(aux_util STATIC ${UTIL_SOURCE_FILES}) target_link_libraries(aux_util PUBLIC aux-includes) -target_link_libraries(aux_util PUBLIC xrt-external-headers) # for u_device target_link_libraries(aux_util PUBLIC aux_math) if(BUILD_WITH_JPEG) @@ -151,6 +152,8 @@ endif() if(BUILD_WITH_SYSTEM_CJSON) target_link_libraries(aux_util PUBLIC cJSON::cJSON) target_compile_definitions(aux_util PRIVATE XRT_USE_SYSTEM_CJSON) +else() + target_link_libraries(aux_util PUBLIC xrt-external-cjson) endif() # Tracking library. @@ -163,7 +166,7 @@ target_include_directories(aux_tracking SYSTEM ${EIGEN3_INCLUDE_DIR} ) # for flexkalman -target_link_libraries(aux_tracking PRIVATE xrt-external-headers) +target_link_libraries(aux_tracking PRIVATE xrt-external-flexkalman) if(BUILD_TRACKING) target_include_directories(aux_tracking SYSTEM PRIVATE diff --git a/src/xrt/auxiliary/meson.build b/src/xrt/auxiliary/meson.build index 7a32c9a18..8712ae8b3 100644 --- a/src/xrt/auxiliary/meson.build +++ b/src/xrt/auxiliary/meson.build @@ -42,7 +42,7 @@ lib_aux_util = static_library( ), include_directories: [ xrt_include, - external_include, + cjson_include, ], dependencies: [ xrt_config_have @@ -63,7 +63,7 @@ lib_aux_ogl = static_library( ), include_directories: [ xrt_include, - external_include, + glad_include, ], ) @@ -150,7 +150,7 @@ endif lib_aux_tracking = static_library( 'aux_tracking', files(tracking_srcs), - include_directories: [xrt_include, external_include], + include_directories: [xrt_include, flexkalman_include], dependencies: tracking_deps ) @@ -168,7 +168,6 @@ lib_aux_vk = static_library( ), include_directories: [ xrt_include, - external_include, ], ) diff --git a/src/xrt/compositor/meson.build b/src/xrt/compositor/meson.build index 321a874da..8b67010a0 100644 --- a/src/xrt/compositor/meson.build +++ b/src/xrt/compositor/meson.build @@ -7,6 +7,7 @@ comp_include = include_directories('.') # TODO: Dependency resolution and subsequent configuration could be improved compositor_deps = [aux, shaders, vulkan, xrt_config_vulkan] +compositor_includes = [xrt_include] compositor_srcs = [ 'client/comp_vk_client.c', @@ -49,6 +50,7 @@ if build_opengl 'client/comp_gles_glue.c', ] compositor_deps += [opengl] + compositor_includes += [glad_include] endif if build_opengl and build_xlib @@ -114,10 +116,7 @@ endif lib_comp = static_library( 'comp', compositor_srcs, - include_directories: [ - xrt_include, - external_include, - ], + include_directories: compositor_includes, dependencies: compositor_deps, c_args: compile_args, cpp_args: compile_args, diff --git a/src/xrt/drivers/CMakeLists.txt b/src/xrt/drivers/CMakeLists.txt index 79f91835e..b63811798 100644 --- a/src/xrt/drivers/CMakeLists.txt +++ b/src/xrt/drivers/CMakeLists.txt @@ -80,7 +80,7 @@ if(BUILD_DRIVER_NS) ) add_library(drv_ns STATIC ${NS_SOURCE_FILES}) - target_link_libraries(drv_ns PRIVATE xrt-interfaces aux_math xrt-external-headers) + target_link_libraries(drv_ns PRIVATE xrt-interfaces aux_math xrt-external-cjson) list(APPEND ENABLED_HEADSET_DRIVERS ns) endif() @@ -146,7 +146,7 @@ if(BUILD_DRIVER_VIVE) ) add_library(drv_vive STATIC ${VIVE_SOURCE_FILES}) - target_link_libraries(drv_vive PRIVATE xrt-interfaces aux_os aux_util aux_math) + target_link_libraries(drv_vive PRIVATE xrt-interfaces aux_os aux_util aux_math xrt-external-cjson) target_link_libraries(drv_vive PRIVATE ${ZLIB_LIBRARIES}) target_include_directories(drv_vive PRIVATE ${ZLIB_INCLUDE_DIRS}) list(APPEND ENABLED_HEADSET_DRIVERS vive) diff --git a/src/xrt/drivers/meson.build b/src/xrt/drivers/meson.build index b43a9ed91..88b1275e1 100644 --- a/src/xrt/drivers/meson.build +++ b/src/xrt/drivers/meson.build @@ -50,7 +50,10 @@ lib_drv_ns = static_library( 'north_star/ns_interface.h', 'north_star/ns_prober.c', ), - include_directories: [xrt_include, external_include], + include_directories: [ + xrt_include, + cjson_include, + ], dependencies: [aux, xrt_config_drivers], build_by_default: 'ns' in drivers, ) @@ -126,7 +129,10 @@ lib_drv_vive = static_library( 'vive/vive_controller_driver.c', 'vive/vive_controller_interface.h' ), - include_directories: [xrt_include, external_include], + include_directories: [ + xrt_include, + cjson_include, + ], dependencies: [aux, zlib], build_by_default: 'vive' in drivers, ) diff --git a/src/xrt/include/xrt/xrt_openxr_includes.h b/src/xrt/include/xrt/xrt_openxr_includes.h index 012f2a9cc..75502d393 100644 --- a/src/xrt/include/xrt/xrt_openxr_includes.h +++ b/src/xrt/include/xrt/xrt_openxr_includes.h @@ -33,6 +33,6 @@ typedef __eglMustCastToProperFunctionPointerType (*PFNEGLGETPROCADDRESSPROC)( #include #endif -#include "openxr_includes/openxr.h" -#include "openxr_includes/openxr_platform.h" -#include "openxr_includes/loader_interfaces.h" +#include "openxr/openxr.h" +#include "openxr/openxr_platform.h" +#include "openxr/loader_interfaces.h" diff --git a/src/xrt/state_trackers/CMakeLists.txt b/src/xrt/state_trackers/CMakeLists.txt index 32dba440a..ca7fa7f78 100644 --- a/src/xrt/state_trackers/CMakeLists.txt +++ b/src/xrt/state_trackers/CMakeLists.txt @@ -1,6 +1,8 @@ # Copyright 2019, Collabora, Ltd. # SPDX-License-Identifier: BSL-1.0 -add_subdirectory(gui) +if(BUILD_WITH_OPENGL) + add_subdirectory(gui) +endif() add_subdirectory(oxr) add_subdirectory(prober) diff --git a/src/xrt/state_trackers/gui/CMakeLists.txt b/src/xrt/state_trackers/gui/CMakeLists.txt index 45618dca8..6faa012dd 100644 --- a/src/xrt/state_trackers/gui/CMakeLists.txt +++ b/src/xrt/state_trackers/gui/CMakeLists.txt @@ -11,21 +11,21 @@ set(GUI_SOURCE_FILES gui_scene_debug.c gui_scene_main_menu.c gui_scene_video.c - ../../../external/imgui/cimgui.cpp - ../../../external/imgui_monado/imgui_monado.cpp - ../../../external/imgui/cimgui.h - ../../../external/imgui/imconfig.h - ../../../external/imgui/imgui.cpp - ../../../external/imgui/imgui.h - ../../../external/imgui/imgui_demo.cpp - ../../../external/imgui/imgui_draw.cpp - ../../../external/imgui/imgui_impl_opengl3.cpp - ../../../external/imgui/imgui_impl_opengl3.h - ../../../external/imgui/imgui_internal.h - ../../../external/imgui/imgui_widgets.cpp - ../../../external/imgui/imstb_rectpack.h - ../../../external/imgui/imstb_textedit.h - ../../../external/imgui/imstb_truetype.h + ../../../external/imgui/imgui/cimgui.cpp + ../../../external/imgui/imgui_monado/imgui_monado.cpp + ../../../external/imgui/imgui/cimgui.h + ../../../external/imgui/imgui/imconfig.h + ../../../external/imgui/imgui/imgui.cpp + ../../../external/imgui/imgui/imgui.h + ../../../external/imgui/imgui/imgui_demo.cpp + ../../../external/imgui/imgui/imgui_draw.cpp + ../../../external/imgui/imgui/imgui_impl_opengl3.cpp + ../../../external/imgui/imgui/imgui_impl_opengl3.h + ../../../external/imgui/imgui/imgui_internal.h + ../../../external/imgui/imgui/imgui_widgets.cpp + ../../../external/imgui/imgui/imstb_rectpack.h + ../../../external/imgui/imgui/imstb_textedit.h + ../../../external/imgui/imgui/imstb_truetype.h ) add_library(st_gui STATIC @@ -33,24 +33,27 @@ add_library(st_gui STATIC ) target_link_libraries(st_gui PRIVATE - xrt-external-headers + xrt-external-glad aux_util ) target_include_directories(st_gui PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}/.. + ${CMAKE_CURRENT_SOURCE_DIR}/../../../external/imgui ) if(BUILD_WITH_SDL2) - add_library(imgui_impl_sdl STATIC - ../../../external/imgui/cimgui_sdl.cpp - ../../../external/imgui/imgui_impl_sdl.cpp - ../../../external/imgui/imgui_impl_sdl.h + add_library(imgui_impl_sdl STATIC + ../../../external/imgui/imgui/cimgui_sdl.cpp + ../../../external/imgui/imgui/imgui_impl_sdl.cpp + ../../../external/imgui/imgui/imgui_impl_sdl.h ) target_link_libraries(imgui_impl_sdl PRIVATE ${SDL2_LIBRARIES} - xrt-external-headers ) - target_include_directories(imgui_impl_sdl PRIVATE + target_include_directories(imgui_impl_sdl + PRIVATE ${SDL2_INCLUDE_DIRS} + PUBLIC + ${CMAKE_CURRENT_SOURCE_DIR}/../../../external/imgui ) endif() diff --git a/src/xrt/state_trackers/gui/meson.build b/src/xrt/state_trackers/gui/meson.build index 164eb0f9d..6ca324f81 100644 --- a/src/xrt/state_trackers/gui/meson.build +++ b/src/xrt/state_trackers/gui/meson.build @@ -1,4 +1,4 @@ -# Copyright 2019, Collabora, Ltd. +# Copyright 2019-2020, Collabora, Ltd. # SPDX-License-Identifier: BSL-1.0 gui_sources = [ @@ -11,22 +11,22 @@ gui_sources = [ 'gui_scene_debug.c', 'gui_scene_main_menu.c', 'gui_scene_video.c', - '../../../external/imgui/cimgui.cpp', - '../../../external/imgui/cimgui.h', - '../../../external/imgui/imconfig.h', - '../../../external/imgui/imgui.cpp', - '../../../external/imgui/imgui.h', - '../../../external/imgui/imgui_demo.cpp', - '../../../external/imgui/imgui_draw.cpp', - '../../../external/imgui/imgui_impl_opengl3.cpp', - '../../../external/imgui/imgui_impl_opengl3.h', - '../../../external/imgui/imgui_internal.h', - '../../../external/imgui/imgui_widgets.cpp', - '../../../external/imgui/imstb_rectpack.h', - '../../../external/imgui/imstb_textedit.h', - '../../../external/imgui/imstb_truetype.h', - '../../../external/imgui_monado/cimgui_monado.h', - '../../../external/imgui_monado/imgui_monado.cpp' + '../../../external/imgui/imgui/cimgui.cpp', + '../../../external/imgui/imgui/cimgui.h', + '../../../external/imgui/imgui/imconfig.h', + '../../../external/imgui/imgui/imgui.cpp', + '../../../external/imgui/imgui/imgui.h', + '../../../external/imgui/imgui/imgui_demo.cpp', + '../../../external/imgui/imgui/imgui_draw.cpp', + '../../../external/imgui/imgui/imgui_impl_opengl3.cpp', + '../../../external/imgui/imgui/imgui_impl_opengl3.h', + '../../../external/imgui/imgui/imgui_internal.h', + '../../../external/imgui/imgui/imgui_widgets.cpp', + '../../../external/imgui/imgui/imstb_rectpack.h', + '../../../external/imgui/imgui/imstb_textedit.h', + '../../../external/imgui/imgui/imstb_truetype.h', + '../../../external/imgui/imgui_monado/cimgui_monado.h', + '../../../external/imgui/imgui_monado/imgui_monado.cpp' ] gui_deps = [aux, xrt_config_have] @@ -36,7 +36,9 @@ lib_st_gui = static_library( files(gui_sources), include_directories: [ xrt_include, - external_include, + glad_include, + cjson_include, + imgui_include, ], dependencies: gui_deps, ) diff --git a/src/xrt/state_trackers/oxr/CMakeLists.txt b/src/xrt/state_trackers/oxr/CMakeLists.txt index feb2ba6bc..6ed5e446d 100644 --- a/src/xrt/state_trackers/oxr/CMakeLists.txt +++ b/src/xrt/state_trackers/oxr/CMakeLists.txt @@ -52,4 +52,4 @@ if(BUILD_WITH_EGL) endif() add_library(st_oxr STATIC ${OXR_SOURCE_FILES}) -target_link_libraries(st_oxr PRIVATE xrt-interfaces aux_util aux_math Vulkan::Vulkan comp_client) +target_link_libraries(st_oxr PRIVATE xrt-interfaces xrt-external-openxr aux_util aux_math Vulkan::Vulkan comp_client) diff --git a/src/xrt/state_trackers/oxr/meson.build b/src/xrt/state_trackers/oxr/meson.build index 751753b3a..94f20952a 100644 --- a/src/xrt/state_trackers/oxr/meson.build +++ b/src/xrt/state_trackers/oxr/meson.build @@ -1,4 +1,4 @@ -# Copyright 2019, Collabora, Ltd. +# Copyright 2019-2020, Collabora, Ltd. # SPDX-License-Identifier: BSL-1.0 compile_args = [] @@ -53,7 +53,7 @@ lib_st_oxr = static_library( ), include_directories: [ xrt_include, - external_include, + openxr_include, ], dependencies: [aux, vulkan], c_args: compile_args, diff --git a/src/xrt/state_trackers/oxr/oxr_api_instance.c b/src/xrt/state_trackers/oxr/oxr_api_instance.c index 5ce054f6a..bf65c8b9b 100644 --- a/src/xrt/state_trackers/oxr/oxr_api_instance.c +++ b/src/xrt/state_trackers/oxr/oxr_api_instance.c @@ -24,8 +24,8 @@ #include "oxr_api_verify.h" #include "oxr_extension_support.h" -#include "openxr_includes/openxr.h" -#include "openxr_includes/openxr_reflection.h" +#include "openxr/openxr.h" +#include "openxr/openxr_reflection.h" #define MAKE_EXTENSION_PROPERTIES(mixed_case, all_caps) \ {XR_TYPE_EXTENSION_PROPERTIES, NULL, XR_##all_caps##_EXTENSION_NAME, \ diff --git a/src/xrt/state_trackers/oxr/oxr_logger.c b/src/xrt/state_trackers/oxr/oxr_logger.c index 0e540ea1a..ae56958a9 100644 --- a/src/xrt/state_trackers/oxr/oxr_logger.c +++ b/src/xrt/state_trackers/oxr/oxr_logger.c @@ -17,7 +17,7 @@ #include "oxr_objects.h" #include "oxr_logger.h" -#include "openxr_includes/openxr_reflection.h" +#include "openxr/openxr_reflection.h" DEBUG_GET_ONCE_BOOL_OPTION(entrypoints, "OXR_DEBUG_ENTRYPOINTS", false) diff --git a/src/xrt/state_trackers/prober/meson.build b/src/xrt/state_trackers/prober/meson.build index ea7725850..179e968d7 100644 --- a/src/xrt/state_trackers/prober/meson.build +++ b/src/xrt/state_trackers/prober/meson.build @@ -1,4 +1,4 @@ -# Copyright 2019, Collabora, Ltd. +# Copyright 2019-2020, Collabora, Ltd. # SPDX-License-Identifier: BSL-1.0 prober_sources = [ @@ -37,7 +37,7 @@ lib_st_prober = static_library( include_directories: [ xrt_include, drv_include, - external_include, + cjson_include, ], dependencies: prober_deps, ) diff --git a/src/xrt/targets/gui/meson.build b/src/xrt/targets/gui/meson.build index ef6a6d08c..e71192c0c 100644 --- a/src/xrt/targets/gui/meson.build +++ b/src/xrt/targets/gui/meson.build @@ -1,4 +1,4 @@ -# Copyright 2019, Collabora, Ltd. +# Copyright 2019-2020, Collabora, Ltd. # SPDX-License-Identifier: BSL-1.0 gui_deps = [ @@ -20,9 +20,9 @@ gui = executable( 'gui_sdl2_imgui.c', 'gui_sdl2_main.c', 'gui_sdl2_prober.c', - '../../../external/imgui/cimgui_sdl.cpp', - '../../../external/imgui/imgui_impl_sdl.cpp', - '../../../external/imgui/imgui_impl_sdl.h', + '../../../external/imgui/imgui/cimgui_sdl.cpp', + '../../../external/imgui/imgui/imgui_impl_sdl.cpp', + '../../../external/imgui/imgui/imgui_impl_sdl.h', ), link_whole: [ lib_aux_os, @@ -36,10 +36,11 @@ gui = executable( include_directories: [ aux_include, common_include, - external_include, + glad_include, st_include, drv_include, xrt_include, + imgui_include, ], dependencies: gui_deps + driver_deps, ) diff --git a/src/xrt/targets/openxr/meson.build b/src/xrt/targets/openxr/meson.build index 96624046a..a9f9e01e5 100644 --- a/src/xrt/targets/openxr/meson.build +++ b/src/xrt/targets/openxr/meson.build @@ -1,4 +1,4 @@ -# Copyright 2019, Collabora, Ltd. +# Copyright 2019-2020, Collabora, Ltd. # SPDX-License-Identifier: BSL-1.0 ###### @@ -17,24 +17,24 @@ runtime_target = '@0@openxr@1@'.format(runtime_prefix, runtime_suffix) xr_api_major = 1 hack_deps = [] -hack_src = [] +hack_src = [ 'oxr_sdl2_hack.c'] hack_libs = [] -hack_incs = [] +hack_incs = [ + glad_include, + imgui_include, +] if sdl2.found() hack_deps += sdl2 hack_src += [ - 'oxr_sdl2_hack.c', - '../../../external/imgui/cimgui_sdl.cpp', - '../../../external/imgui/imgui_impl_sdl.cpp', - '../../../external/imgui/imgui_impl_sdl.h', + '../../../external/imgui/imgui/cimgui_sdl.cpp', + '../../../external/imgui/imgui/imgui_impl_sdl.cpp', + '../../../external/imgui/imgui/imgui_impl_sdl.h', ] hack_libs += lib_st_gui hack_incs += [ st_include, ] -else - hack_src += 'oxr_sdl2_hack.c' endif openxr_deps = [ @@ -84,7 +84,7 @@ openxr = library( lib_target_instance, ] + driver_libs + hack_libs, include_directories: [ - external_include, + openxr_include, st_include, # Sigh debian meson requires this. aux_include, common_include,