Skip to content

Commit

Permalink
🔧 Temporary disabled OpenVR plugin since it is not linking on windows
Browse files Browse the repository at this point in the history
  • Loading branch information
AnotherFoxGuy committed Jan 22, 2024
1 parent 369db8d commit e824202
Show file tree
Hide file tree
Showing 5 changed files with 37 additions and 9 deletions.
10 changes: 8 additions & 2 deletions conan-recipes/openvr/all/conandata.yml
Original file line number Diff line number Diff line change
@@ -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
27 changes: 24 additions & 3 deletions conan-recipes/openvr/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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"
Expand Down
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down
5 changes: 3 additions & 2 deletions plugins/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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})
Expand Down
2 changes: 1 addition & 1 deletion plugins/openvr/src/ViveControllerManager.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@
#include "OpenVrHelpers.h"

#ifdef Q_OS_WIN
#define VIVE_PRO_EYE
// #define VIVE_PRO_EYE
#endif

using PuckPosePair = std::pair<uint32_t, controller::Pose>;
Expand Down

0 comments on commit e824202

Please sign in to comment.