From 1b46ec600a98413b5b782fb82b804c8d2f239d2d Mon Sep 17 00:00:00 2001 From: Dale Glass Date: Thu, 7 Dec 2023 15:20:03 -0800 Subject: [PATCH] Fixes for Oculus VR plugin --- cmake/externals/LibOVR/CMakeLists.txt | 2 ++ cmake/externals/LibOVRPlatform/CMakeLists.txt | 2 ++ plugins/CMakeLists.txt | 11 ++++++----- 3 files changed, 10 insertions(+), 5 deletions(-) diff --git a/cmake/externals/LibOVR/CMakeLists.txt b/cmake/externals/LibOVR/CMakeLists.txt index 51a85f0117..17110cea90 100644 --- a/cmake/externals/LibOVR/CMakeLists.txt +++ b/cmake/externals/LibOVR/CMakeLists.txt @@ -23,6 +23,8 @@ if (WIN32) PATCH_COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/LibOVRCMakeLists.txt" /CMakeLists.txt LOG_DOWNLOAD 1 DOWNLOAD_EXTRACT_TIMESTAMP 1 + BUILD_BYPRODUCTS + "project/Lib/LibOVR.lib" ) ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR) diff --git a/cmake/externals/LibOVRPlatform/CMakeLists.txt b/cmake/externals/LibOVRPlatform/CMakeLists.txt index 492827210a..d6b3478418 100644 --- a/cmake/externals/LibOVRPlatform/CMakeLists.txt +++ b/cmake/externals/LibOVRPlatform/CMakeLists.txt @@ -16,6 +16,8 @@ if (WIN32) INSTALL_COMMAND "" LOG_DOWNLOAD 1 DOWNLOAD_EXTRACT_TIMESTAMP 1 + BUILD_BYPRODUCTS + "project/src/LibOVRPlatform/Windows/LibOVRPlatform64_1.lib" ) ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR) diff --git a/plugins/CMakeLists.txt b/plugins/CMakeLists.txt index 7205efa398..e130aa7f25 100644 --- a/plugins/CMakeLists.txt +++ b/plugins/CMakeLists.txt @@ -13,17 +13,18 @@ list(REMOVE_ITEM PLUGIN_SUBDIRS "CMakeFiles") # client-side plugins if (NOT SERVER_ONLY AND NOT ANDROID) if (NOT CMAKE_SYSTEM_PROCESSOR STREQUAL "aarch64") - if (NOT ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") AND (MSVC_VERSION LESS 1930))) + if ((CMAKE_CXX_COMPILER_ID STREQUAL "MSVC") AND (MSVC_VERSION GREATER 1930)) + message(WARNING "Building under ${CMAKE_CXX_COMPILER_ID}, MSVC Version ${MSVC_VERSION}. Oculus plugin unsupported, disabling.") + else() # Check if we're building on MSVC 2022. If so, Oculus plugin fails to build. set(DIR "oculus") add_subdirectory(${DIR}) - set(DIR "openvr") - add_subdirectory(${DIR}) set(DIR "oculusLegacy") add_subdirectory(${DIR}) - else() - message(WARNING "Building under ${CMAKE_CXX_COMPILER_ID}, MSVC Version ${MSVC_VERSION}. Oculus plugin unsupported, disabling.") endif() + + set(DIR "openvr") + add_subdirectory(${DIR}) endif() set(DIR "hifiSdl2")