Fixes for Oculus VR plugin

This commit is contained in:
Dale Glass 2023-12-07 15:20:03 -08:00
parent 6a00d4baf8
commit 1b46ec600a
3 changed files with 10 additions and 5 deletions

View file

@ -23,6 +23,8 @@ if (WIN32)
PATCH_COMMAND ${CMAKE_COMMAND} -E copy "${CMAKE_CURRENT_SOURCE_DIR}/LibOVRCMakeLists.txt" <SOURCE_DIR>/CMakeLists.txt
LOG_DOWNLOAD 1
DOWNLOAD_EXTRACT_TIMESTAMP 1
BUILD_BYPRODUCTS
"project/Lib/LibOVR.lib"
)
ExternalProject_Get_Property(${EXTERNAL_NAME} SOURCE_DIR)

View file

@ -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)

View file

@ -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")