diff --git a/conan-recipes/openvr/all/conandata.yml b/conan-recipes/openvr/all/conandata.yml index 5d517862aca..193317e08f9 100644 --- a/conan-recipes/openvr/all/conandata.yml +++ b/conan-recipes/openvr/all/conandata.yml @@ -1,4 +1,10 @@ sources: - "1.26.7": - url: https://github.com/ValveSoftware/openvr/archive/refs/tags/v1.26.7.tar.gz + 1.26.7: sha256: e7391f1129db777b2754f5b017cfa356d7811a7bcaf57f09805b47c2e630a725 + url: https://github.com/ValveSoftware/openvr/archive/refs/tags/v1.26.7.tar.gz + 2.0.10: + sha256: 22c9a3c5c2ed9ebf0423ab329ecc3b870b0c980abdfbaaa204e5b59313d8c7e3 + url: https://github.com/ValveSoftware/openvr/archive/refs/tags/v2.0.10.tar.gz + 2.2.3: + sha256: 4da20c2c33e7488703802eafd7f2e6c92dd0f324e887711e1e11e9b9d3dd3daa + url: https://github.com/ValveSoftware/openvr/archive/refs/tags/v2.2.3.tar.gz diff --git a/conan-recipes/openvr/all/conanfile.py b/conan-recipes/openvr/all/conanfile.py index f50cfd54b9e..c7ad109e3d3 100644 --- a/conan-recipes/openvr/all/conanfile.py +++ b/conan-recipes/openvr/all/conanfile.py @@ -21,16 +21,31 @@ def layout(self): cmake_layout(self) def requirements(self): - self.requires("jsoncpp/1.9.4") + self.requires("jsoncpp/1.9.5") def source(self): get(self, **self.conan_data["sources"][self.version], strip_root=True) # Unvendor jsoncpp (we rely on our CMake wrapper for jsoncpp injection) - replace_in_file(self, os.path.join(self.source_folder, "src", "CMakeLists.txt"), "jsoncpp.cpp", "") + replace_in_file( + self, + os.path.join(self.source_folder, "src", "CMakeLists.txt"), + "jsoncpp.cpp", + "", + ) + replace_in_file( + self, + os.path.join(self.source_folder, "src", "CMakeLists.txt"), + "target_link_libraries(${LIBNAME} ${EXTRA_LIBS} ${CMAKE_DL_LIBS})", + """ + find_package(jsoncpp) + target_link_libraries(${LIBNAME} JsonCpp::JsonCpp ${EXTRA_LIBS} ${CMAKE_DL_LIBS}) + """, + ) def generate(self): tc = CMakeToolchain(self) tc.variables["BUILD_UNIVERSAL"] = "OFF" + # tc.variables["BUILD_SHARED"] = "ON" tc.variables["USE_LIBCXX"] = "OFF" tc.generate() deps = CMakeDeps(self) @@ -45,7 +60,13 @@ def package(self): copy(self, "LICENSE", src=self.source_folder, dst="licenses") cmake = CMake(self) cmake.install() - copy(self, pattern="openvr_api*.dll", dst="bin", src=os.path.join(self.source_folder, "bin"), keep_path=False) + copy( + self, + pattern="*.dll", + dst="bin", + src=os.path.join(self.build_folder, "bin", "win64"), + keep_path=False, + ) def package_info(self): self.cpp_info.names["pkg_config"] = "openvr" diff --git a/conanfile.py b/conanfile.py index e0d42b68c3a..95f20a7d2d5 100644 --- a/conanfile.py +++ b/conanfile.py @@ -54,7 +54,7 @@ def requirements(self): self.requires("nvidia-texture-tools/2023.01@overte/stable") self.requires("openexr/3.1.9") self.requires("openssl/1.1.1w") - self.requires("openvr/1.26.7@overte/stable") + self.requires("openvr/2.2.3@overte/stable") self.requires("opus/1.4") self.requires("polyvox/0.2.1@overte/stable") self.requires("quazip/1.4@overte/stable") diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index ad55391e7e3..5d812118052 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -20,8 +20,9 @@ if (NOT SERVER_ONLY AND NOT ANDROID) endif() # Note: OpenVR is a Steam thing, which is different from OVR, which is an Oculus SDK component. - set(DIR "openvr") - add_subdirectory(${DIR}) + #set(DIR "openvr") + #add_subdirectory(${DIR}) + message("NOTE: OpenVr has been disabled for now (not linking properly)") set(DIR "hifiSdl2") add_subdirectory(${DIR}) diff --git a/plugins/openvr/src/ViveControllerManager.h b/plugins/openvr/src/ViveControllerManager.h index 1615c5c24e2..95cc457ebbf 100644 --- a/plugins/openvr/src/ViveControllerManager.h +++ b/plugins/openvr/src/ViveControllerManager.h @@ -26,7 +26,7 @@ #include "OpenVrHelpers.h" #ifdef Q_OS_WIN -#define VIVE_PRO_EYE +// #define VIVE_PRO_EYE #endif using PuckPosePair = std::pair;