summaryrefslogtreecommitdiff
path: root/indra/cmake
diff options
context:
space:
mode:
authorRye Mutt <rye@lindenlab.com>2024-09-05 08:50:01 -0700
committerGitHub <noreply@github.com>2024-09-05 08:50:01 -0700
commitc963baeedbf943b54e09b3eabf7bfa45703b7c7c (patch)
tree620f3924cf72c36c2a0730edda3a14e674388dee /indra/cmake
parentbacf9cfeab90bd1ffad827fa3c34ced985c768a2 (diff)
parent8c65a61b095545b88ecb0820fa0e6ccd484d242a (diff)
Merge pull request #2510 from RyeMutt/openxr
Introduce OpenXR SDK prebuilt package and cmake setup
Diffstat (limited to 'indra/cmake')
-rw-r--r--indra/cmake/OpenXR.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/indra/cmake/OpenXR.cmake b/indra/cmake/OpenXR.cmake
new file mode 100644
index 0000000000..2cc862b927
--- /dev/null
+++ b/indra/cmake/OpenXR.cmake
@@ -0,0 +1,22 @@
+# -*- cmake -*-
+
+include(Prebuilt)
+
+include_guard()
+add_library( ll::openxr INTERFACE IMPORTED )
+
+if(USE_CONAN )
+ target_link_libraries( ll::openxr INTERFACE CONAN_PKG::openxr )
+ return()
+endif()
+
+use_prebuilt_binary(openxr)
+if (WINDOWS)
+ target_link_libraries( ll::openxr INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/openxr_loader.lib )
+else()
+ target_link_libraries( ll::openxr INTERFACE ${ARCH_PREBUILT_DIRS_RELEASE}/libopenxr_loader.a )
+endif (WINDOWS)
+
+if( NOT LINUX )
+ target_include_directories( ll::openxr SYSTEM INTERFACE ${LIBS_PREBUILT_DIR}/include)
+endif()