diff options
Diffstat (limited to 'build_files/cmake/platform')
-rw-r--r-- | build_files/cmake/platform/platform_apple.cmake | 8 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_unix.cmake | 8 | ||||
-rw-r--r-- | build_files/cmake/platform/platform_win32.cmake | 12 |
3 files changed, 28 insertions, 0 deletions
diff --git a/build_files/cmake/platform/platform_apple.cmake b/build_files/cmake/platform/platform_apple.cmake index 123eb3ef7a0..11889fc7a87 100644 --- a/build_files/cmake/platform/platform_apple.cmake +++ b/build_files/cmake/platform/platform_apple.cmake @@ -421,6 +421,14 @@ if(WITH_OPENMP) endif() endif() +if(WITH_XR_OPENXR) + find_package(OpenXR-SDK) + if(NOT OPENXR_SDK_FOUND) + message(WARNING "OpenXR-SDK was not found, disabling WITH_XR_OPENXR") + set(WITH_XR_OPENXR OFF) + endif() +endif() + set(EXETYPE MACOSX_BUNDLE) set(CMAKE_C_FLAGS_DEBUG "-fno-strict-aliasing -g") diff --git a/build_files/cmake/platform/platform_unix.cmake b/build_files/cmake/platform/platform_unix.cmake index 3b40f7c329b..dcb6b9d34f9 100644 --- a/build_files/cmake/platform/platform_unix.cmake +++ b/build_files/cmake/platform/platform_unix.cmake @@ -428,6 +428,14 @@ if(WITH_TBB) find_package_wrapper(TBB) endif() +if(WITH_XR_OPENXR) + find_package(XR-OpenXR-SDK) + if(NOT XR_OPENXR_SDK_FOUND) + message(WARNING "OpenXR-SDK not found, disabling WITH_XR_OPENXR") + set(WITH_XR_OPENXR OFF) + endif() +endif() + if(EXISTS ${LIBDIR}) without_system_libs_end() endif() diff --git a/build_files/cmake/platform/platform_win32.cmake b/build_files/cmake/platform/platform_win32.cmake index 7ba7e3999e4..452deb497b2 100644 --- a/build_files/cmake/platform/platform_win32.cmake +++ b/build_files/cmake/platform/platform_win32.cmake @@ -713,3 +713,15 @@ if(WINDOWS_PYTHON_DEBUG) </Project>") endif() endif() + +if(WITH_XR_OPENXR) + if(EXISTS ${LIBDIR}/xr_openxr_sdk) + set(XR_OPENXR_SDK ${LIBDIR}/xr_openxr_sdk) + set(XR_OPENXR_SDK_LIBPATH ${LIBDIR}/xr_openxr_sdk/lib) + set(XR_OPENXR_SDK_INCLUDE_DIR ${XR_OPENXR_SDK}/include) + set(XR_OPENXR_SDK_LIBRARIES optimized ${XR_OPENXR_SDK_LIBPATH}/openxr_loader.lib debug ${XR_OPENXR_SDK_LIBPATH}/openxr_loader_d.lib) + else() + message(WARNING "OpenXR-SDK was not found, disabling WITH_XR_OPENXR") + set(WITH_XR_OPENXR OFF) + endif() +endif() |