From 3e16c616d564b83a6df3dc166cf9c23e5951c242 Mon Sep 17 00:00:00 2001 From: Erwin Coumans Date: Fri, 4 Dec 2020 08:52:28 -0800 Subject: [PATCH] cmake OPTION(USE_OPENVR OFF) so only compile OpenVR VR examples when explicitly set to ON to avoid breaking builds --- CMakeLists.txt | 1 + examples/SharedMemory/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5a460ee8e..7860f1552 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -28,6 +28,7 @@ SET(CLAMP_VELOCITIES "0" CACHE STRING "Clamp rigid bodies' velocity to this valu OPTION(USE_GRAPHICAL_BENCHMARK "Use Graphical Benchmark" ON) OPTION(BUILD_SHARED_LIBS "Use shared libraries" OFF) OPTION(USE_SOFT_BODY_MULTI_BODY_DYNAMICS_WORLD "Use btSoftMultiBodyDynamicsWorld" ON) +OPTION(USE_OPENVR "Use OpenVR for virtual reality" OFF) OPTION(BULLET2_MULTITHREADING "Build Bullet 2 libraries with mutex locking around certain operations (required for multi-threading)" OFF) IF (BULLET2_MULTITHREADING) diff --git a/examples/SharedMemory/CMakeLists.txt b/examples/SharedMemory/CMakeLists.txt index 93a8fc6b9..4da5cc3e3 100644 --- a/examples/SharedMemory/CMakeLists.txt +++ b/examples/SharedMemory/CMakeLists.txt @@ -225,6 +225,8 @@ ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) #VR/OpenVR on Windows and Mac OSX +IF(USE_OPENVR) + IF (WIN32 OR APPLE) INCLUDE_DIRECTORIES( @@ -413,3 +415,5 @@ ELSE(WIN32 OR APPLE) ENDIF(INTERNAL_ADD_POSTFIX_EXECUTABLE_NAMES) ENDIF(WIN32 OR APPLE) +ENDIF(USE_OPENVR) +