From 8c65a61b095545b88ecb0820fa0e6ccd484d242a Mon Sep 17 00:00:00 2001 From: Rye Cogtail Date: Wed, 4 Sep 2024 23:10:13 -0400 Subject: Introduce OpenXR SDK prebuilt package and cmake setup (#2503) --- autobuild.xml | 62 ++++++++++++++++++++++++++++++++++++++++++++ indra/cmake/OpenXR.cmake | 22 ++++++++++++++++ indra/newview/CMakeLists.txt | 2 ++ 3 files changed, 86 insertions(+) create mode 100644 indra/cmake/OpenXR.cmake diff --git a/autobuild.xml b/autobuild.xml index f90f114601..95ee34439b 100644 --- a/autobuild.xml +++ b/autobuild.xml @@ -2210,6 +2210,68 @@ Copyright (c) 2012, 2014, 2015, 2016 nghttp2 contributors description Secure Sockets Layer (SSL v2/v3) and Transport Layer Security (TLS v1) Library + openxr + + platforms + + windows64 + + archive + + hash + 3cccc3e3f3137066c286270b35abc00ee0c0bb0c + hash_algorithm + sha1 + url + https://github.com/secondlife/3p-openxr/releases/download/v1.1.40-r1/openxr-1.1.40-r1-windows64-10710818432.tar.zst + + name + windows64 + + linux64 + + archive + + hash + f0ad0418a98fb8cb6e158fca3902c15ac1de9d2a + hash_algorithm + sha1 + url + https://github.com/secondlife/3p-openxr/releases/download/v1.1.40-r1/openxr-1.1.40-r1-linux64-10710818432.tar.zst + + name + linux64 + + darwin64 + + archive + + hash + a9bfabec63a987bd34bcfdc295b928bd0696e1d7 + hash_algorithm + sha1 + url + https://github.com/secondlife/3p-openxr/releases/download/v1.1.40-r1/openxr-1.1.40-r1-darwin64-10710818432.tar.zst + + name + darwin64 + + + license + Apache 2.0 + license_file + LICENSES/openxr.txt + copyright + Copyright 2017-2024, The Khronos Group Inc. + version + 1.1.40-r1 + name + openxr + canonical_repo + https://github.com/secondlife/3p-openxr + description + Generated headers and sources for OpenXR loader. + slvoice platforms 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() diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt index 7a9f3a46b5..859ccbd4cd 100644 --- a/indra/newview/CMakeLists.txt +++ b/indra/newview/CMakeLists.txt @@ -33,6 +33,7 @@ include(NVAPI) include(OPENAL) include(OpenGL) include(OpenSSL) +include(OpenXR) include(PNG) include(TemplateCheck) include(TinyEXR) @@ -1928,6 +1929,7 @@ target_link_libraries(${VIEWER_BINARY_NAME} ${LLPHYSICSEXTENSIONS_LIBRARIES} ll::bugsplat ll::tracy + ll::openxr ) if( TARGET ll::intel_memops ) -- cgit v1.2.3