mirror of
https://github.com/overte-org/overte.git
synced 2025-04-07 14:12:26 +02:00
fix the Sixense and LibOVR find modules
This commit is contained in:
parent
aef15b86bf
commit
3dc41bc19b
2 changed files with 15 additions and 8 deletions
|
@ -16,12 +16,19 @@ if (LIBOVR_LIBRARIES AND LIBOVR_INCLUDE_DIRS)
|
|||
# in cache already
|
||||
set(LIBOVR_FOUND TRUE)
|
||||
else (LIBOVR_LIBRARIES AND LIBOVR_INCLUDE_DIRS)
|
||||
set(LIBOVR_SEARCH_DIRS "${LIBOVR_ROOT_DIR}" "$ENV{HIFI_LIB_DIR}/sixense")
|
||||
set(LIBOVR_SEARCH_DIRS "${LIBOVR_ROOT_DIR}" "$ENV{HIFI_LIB_DIR}/oculus")
|
||||
|
||||
find_path(LIBOVR_INCLUDE_DIRS Include/OVR.h HINTS "${LIBOVR_SEARCH_DIRS}")
|
||||
find_path(LIBOVR_INCLUDE_DIRS Include/OVR.h HINTS ${LIBOVR_SEARCH_DIRS})
|
||||
|
||||
if (APPLE)
|
||||
find_library(LIBOVR_LIBRARIES "Lib/MacOS/${CMAKE_BUILD_TYPE}/libovr.a" HINTS "${LIBOVR_SEARCH_PATHS}")
|
||||
|
||||
if (${CMAKE_BUILD_TYPE})
|
||||
set(LIBOVR_LIBRARY_TYPE ${CMAKE_BUILD_TYPE})
|
||||
else()
|
||||
set(LIBOVR_LIBRARY_TYPE "Debug")
|
||||
endif()
|
||||
|
||||
find_library(LIBOVR_LIBRARIES "Lib/MacOS/${LIBOVR_LIBRARY_TYPE}/libovr.a" HINTS ${LIBOVR_SEARCH_DIRS})
|
||||
elseif (UNIX)
|
||||
find_library(UDEV_LIBRARY libudev.a /usr/lib/x86_64-linux-gnu/)
|
||||
find_library(XINERAMA_LIBRARY libXinerama.a /usr/lib/x86_64-linux-gnu/)
|
||||
|
@ -32,7 +39,7 @@ else (LIBOVR_LIBRARIES AND LIBOVR_INCLUDE_DIRS)
|
|||
set(LINUX_ARCH_DIR "x86_64")
|
||||
endif()
|
||||
|
||||
find_library(OVR_LIBRARY "Lib/Linux/${CMAKE_BUILD_TYPE}/${LINUX_ARCH_DIR}/libovr.a" HINTS "${LIBOVR_SEARCH_PATHS}")
|
||||
find_library(OVR_LIBRARY "Lib/Linux/${CMAKE_BUILD_TYPE}/${LINUX_ARCH_DIR}/libovr.a" HINTS ${LIBOVR_SEARCH_DIRS})
|
||||
if (UDEV_LIBRARY AND XINERAMA_LIBRARY AND OVR_LIBRARY)
|
||||
set(LIBOVR_LIBRARIES "${OVR_LIBRARY};${UDEV_LIBRARY};${XINERAMA_LIBRARY}" CACHE INTERNAL "Oculus libraries")
|
||||
endif (UDEV_LIBRARY AND XINERAMA_LIBRARY AND OVR_LIBRARY)
|
||||
|
@ -55,7 +62,7 @@ else (LIBOVR_LIBRARIES AND LIBOVR_INCLUDE_DIRS)
|
|||
endif()
|
||||
endif()
|
||||
|
||||
find_library(LIBOVR_LIBRARIES "Lib/${WINDOWS_ARCH_DIR}/${LIBOVR_NAME}" HINTS "${LIBOVR_SEARCH_DIRS}")
|
||||
find_library(LIBOVR_LIBRARIES "Lib/${WINDOWS_ARCH_DIR}/${LIBOVR_NAME}" HINTS ${LIBOVR_SEARCH_DIRS})
|
||||
endif ()
|
||||
|
||||
if (LIBOVR_INCLUDE_DIRS AND LIBOVR_LIBRARIES)
|
||||
|
|
|
@ -19,12 +19,12 @@ else (SIXENSE_LIBRARIES AND SIXENSE_INCLUDE_DIRS)
|
|||
|
||||
set(SIXENSE_SEARCH_DIRS "${SIXENSE_ROOT_DIR}" "$ENV{HIFI_LIB_DIR}/sixense")
|
||||
|
||||
find_path(SIXENSE_INCLUDE_DIRS include/sixense.h HINTS "${SIXENSE_SEARCH_DIRS}")
|
||||
find_path(SIXENSE_INCLUDE_DIRS include/sixense.h HINTS ${SIXENSE_SEARCH_DIRS})
|
||||
|
||||
if (APPLE)
|
||||
find_library(SIXENSE_LIBRARIES lib/osx_x64/release_dll/libsixense_x64.dylib HINTS "${SIXENSE_SEARCH_DIRS}")
|
||||
find_library(SIXENSE_LIBRARIES lib/osx_x64/release_dll/libsixense_x64.dylib HINTS ${SIXENSE_SEARCH_DIRS})
|
||||
elseif (UNIX)
|
||||
find_library(SIXENSE_LIBRARIES lib/linux_x64/release/libsixense_x64.so HINTS "${SIXENSE_SEARCH_DIRS}")
|
||||
find_library(SIXENSE_LIBRARIES lib/linux_x64/release/libsixense_x64.so HINTS ${SIXENSE_SEARCH_DIRS})
|
||||
endif ()
|
||||
|
||||
if (SIXENSE_INCLUDE_DIRS AND SIXENSE_LIBRARIES)
|
||||
|
|
Loading…
Reference in a new issue