Skip to content

Commit

Permalink
Revert "Merge commit 'refs/pull/338/head' of https://github.com/coelc…
Browse files Browse the repository at this point in the history
…kers/gzdoom"

This reverts commit 56806e3, reversing
changes made to e1a2de4.
  • Loading branch information
madame-rachelle committed Jul 10, 2017
1 parent 04b1163 commit 8c0706e
Showing 1 changed file with 23 additions and 32 deletions.
55 changes: 23 additions & 32 deletions src/CMakeLists.txt
Expand Up @@ -477,39 +477,31 @@ if (GZDOOM_USE_OPENVR)
${OPENVR_SDK_PATH}/headers
)
include_directories("${OPENVR_INCLUDE_DIRECTORY}")
option( GZDOOM_OPENVR_STATIC "Statically link OpenVR API" ON )
if(GZDOOM_OPENVR_STATIC)
# Incorporate the whole openvr API into zdoom, using a few rules lifted from the OpenVR CMakeLists.txt files
add_definitions( -DVR_API_PUBLIC )
include_directories(${OPENVR_SDK_PATH}/src ${OPENVR_SDK_PATH}/src/vrcommon)
file(GLOB OPENVR_SOURCES "${OPENVR_SDK_PATH}/src/*.cpp" "${OPENVR_SDK_PATH}/src/vrcommon/*.cpp")
else() # link to shared OpenVR library
# Link to correct library for this platform
if(WIN32)
set(OPENVR_PLAT "win")
elseif( APPLE )
set(OPENVR_PLAT "osx")
else()
set(OPENVR_PLAT "linux")
endif()
if(X64)
set(OPENVR_PLAT ${OPENVR_PLAT}64)
else()
set(OPENVR_PLAT ${OPENVR_PLAT}32)
endif()
find_library(OPENVR_LIBRARY
NAMES openvr_api
HINTS "${OPENVR_SDK_PATH}/lib/${OPENVR_PLAT}/"
)
list(APPEND ZDOOM_LIBS ${OPENVR_LIBRARY})
# Find shared library file needed for package distribution
find_program(OPENVR_SHARED_LIBRARY
NAMES libopenvr_api.so libopenvr_api.dylib openvr_api.dll
PATHS "${OPENVR_SDK_PATH}/bin/${OPENVR_PLAT}/"
NO_DEFAULT_PATH
)
# Link to correct library for this platform
if(WIN32)
set(OPENVR_PLAT "win")
elseif( APPLE )
set(OPENVR_PLAT "osx")
else()
set(OPENVR_PLAT "linux")
endif()
if(X64)
set(OPENVR_PLAT ${OPENVR_PLAT}64)
else()
set(OPENVR_PLAT ${OPENVR_PLAT}32)
endif()
find_library(OPENVR_LIBRARY
NAMES openvr_api
HINTS "${OPENVR_SDK_PATH}/lib/${OPENVR_PLAT}/"
)
list(APPEND ZDOOM_LIBS ${OPENVR_LIBRARY})
add_definitions("-DUSE_OPENVR")
# Find shared library file needed for package distribution
find_program(OPENVR_SHARED_LIBRARY
NAMES libopenvr_api.so libopenvr_api.dylib openvr_api.dll
PATHS "${OPENVR_SDK_PATH}/bin/${OPENVR_PLAT}/"
NO_DEFAULT_PATH
)
endif()

# Start defining source files for ZDoom
Expand Down Expand Up @@ -1199,7 +1191,6 @@ add_executable( zdoom WIN32 MACOSX_BUNDLE
${X86_SOURCES}
${FASTMATH_SOURCES}
${PCH_SOURCES}
${OPENVR_SOURCES}
x86.cpp
strnatcmp.c
zstring.cpp
Expand Down

0 comments on commit 8c0706e

Please sign in to comment.