mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-08-09 21:56:26 +02:00
cleanup Faceplus and Faceshift find modules, fix for OVR stitched include
This commit is contained in:
parent
5f8b6de153
commit
68f9334628
4 changed files with 39 additions and 48 deletions
|
@ -19,7 +19,4 @@ if (WIN32)
|
||||||
endif (WIN32)
|
endif (WIN32)
|
||||||
|
|
||||||
include(FindPackageHandleStandardArgs)
|
include(FindPackageHandleStandardArgs)
|
||||||
find_package_handle_standard_args(FACEPLUS DEFAULT_MSG FACEPLUS_INCLUDE_DIRS FACEPLUS_LIBRARIES)
|
find_package_handle_standard_args(FACEPLUS DEFAULT_MSG FACEPLUS_INCLUDE_DIRS FACEPLUS_LIBRARIES)
|
||||||
|
|
||||||
# show the FACEPLUS_INCLUDE_DIRS and FACEPLUS_LIBRARIES variables only in the advanced view
|
|
||||||
mark_as_advanced(FACEPLUS_INCLUDE_DIRS FACEPLUS_LIBRARIES)
|
|
|
@ -18,47 +18,41 @@
|
||||||
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
# See the accompanying file LICENSE or http://www.apache.org/licenses/LICENSE-2.0.html
|
||||||
#
|
#
|
||||||
|
|
||||||
if (FACESHIFT_LIBRARIES AND FACESHIFT_INCLUDE_DIRS)
|
find_path(FACESHIFT_INCLUDE_DIRS fsbinarystream.h ${FACESHIFT_ROOT_DIR}/include)
|
||||||
# in cache already
|
|
||||||
set(FACESHIFT_FOUND TRUE)
|
|
||||||
else ()
|
|
||||||
find_path(FACESHIFT_INCLUDE_DIRS fsbinarystream.h ${FACESHIFT_ROOT_DIR}/include)
|
|
||||||
|
|
||||||
if (APPLE)
|
|
||||||
find_library(FACESHIFT_LIBRARIES libfaceshift.a ${FACESHIFT_ROOT_DIR}/lib/MacOS/)
|
|
||||||
elseif (UNIX)
|
|
||||||
find_library(FACESHIFT_LIBRARIES libfaceshift.a ${FACESHIFT_ROOT_DIR}/lib/UNIX/)
|
|
||||||
elseif (WIN32)
|
|
||||||
# For windows, we're going to build the faceshift sources directly into the interface build
|
|
||||||
# and not link to a prebuilt library. This is because the VS2010 linker doesn't like cross-linking
|
|
||||||
# between release and debug libraries. If we change that in the future we can make win32 more
|
|
||||||
# like the other platforms
|
|
||||||
#find_library(FACESHIFT_LIBRARIES faceshift.lib ${FACESHIFT_ROOT_DIR}/lib/WIN32/)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (WIN32)
|
|
||||||
# Windows only cares about the headers
|
|
||||||
if (FACESHIFT_INCLUDE_DIRS)
|
|
||||||
set(FACESHIFT_FOUND TRUE)
|
|
||||||
endif (FACESHIFT_INCLUDE_DIRS)
|
|
||||||
else ()
|
|
||||||
# Mac and Unix requires libraries
|
|
||||||
if (FACESHIFT_INCLUDE_DIRS AND FACESHIFT_LIBRARIES)
|
|
||||||
set(FACESHIFT_FOUND TRUE)
|
|
||||||
endif (FACESHIFT_INCLUDE_DIRS AND FACESHIFT_LIBRARIES)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
if (FACESHIFT_FOUND)
|
|
||||||
if (NOT FACESHIFT_FIND_QUIETLY)
|
|
||||||
message(STATUS "Found Faceshift... ${FACESHIFT_LIBRARIES}")
|
|
||||||
endif (NOT FACESHIFT_FIND_QUIETLY)
|
|
||||||
else ()
|
|
||||||
if (FACESHIFT_FIND_REQUIRED)
|
|
||||||
message(FATAL_ERROR "Could not find Faceshift")
|
|
||||||
endif (FACESHIFT_FIND_REQUIRED)
|
|
||||||
endif ()
|
|
||||||
|
|
||||||
# show the FACESHIFT_INCLUDE_DIRS and FACESHIFT_LIBRARIES variables only in the advanced view
|
|
||||||
mark_as_advanced(FACESHIFT_INCLUDE_DIRS FACESHIFT_LIBRARIES)
|
|
||||||
|
|
||||||
|
if (APPLE)
|
||||||
|
find_library(FACESHIFT_LIBRARIES libfaceshift.a ${FACESHIFT_ROOT_DIR}/lib/MacOS/)
|
||||||
|
elseif (UNIX)
|
||||||
|
find_library(FACESHIFT_LIBRARIES libfaceshift.a ${FACESHIFT_ROOT_DIR}/lib/UNIX/)
|
||||||
|
elseif (WIN32)
|
||||||
|
# For windows, we're going to build the faceshift sources directly into the interface build
|
||||||
|
# and not link to a prebuilt library. This is because the VS2010 linker doesn't like cross-linking
|
||||||
|
# between release and debug libraries. If we change that in the future we can make win32 more
|
||||||
|
# like the other platforms
|
||||||
|
#find_library(FACESHIFT_LIBRARIES faceshift.lib ${FACESHIFT_ROOT_DIR}/lib/WIN32/)
|
||||||
endif ()
|
endif ()
|
||||||
|
|
||||||
|
if (WIN32)
|
||||||
|
# Windows only cares about the headers
|
||||||
|
if (FACESHIFT_INCLUDE_DIRS)
|
||||||
|
set(FACESHIFT_FOUND TRUE)
|
||||||
|
endif (FACESHIFT_INCLUDE_DIRS)
|
||||||
|
else ()
|
||||||
|
# Mac and Unix requires libraries
|
||||||
|
if (FACESHIFT_INCLUDE_DIRS AND FACESHIFT_LIBRARIES)
|
||||||
|
set(FACESHIFT_FOUND TRUE)
|
||||||
|
endif (FACESHIFT_INCLUDE_DIRS AND FACESHIFT_LIBRARIES)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
if (FACESHIFT_FOUND)
|
||||||
|
if (NOT FACESHIFT_FIND_QUIETLY)
|
||||||
|
message(STATUS "Found Faceshift... ${FACESHIFT_LIBRARIES}")
|
||||||
|
endif (NOT FACESHIFT_FIND_QUIETLY)
|
||||||
|
else ()
|
||||||
|
if (FACESHIFT_FIND_REQUIRED)
|
||||||
|
message(FATAL_ERROR "Could not find Faceshift")
|
||||||
|
endif (FACESHIFT_FIND_REQUIRED)
|
||||||
|
endif ()
|
||||||
|
|
||||||
|
# show the FACESHIFT_INCLUDE_DIRS and FACESHIFT_LIBRARIES variables only in the advanced view
|
||||||
|
mark_as_advanced(FACESHIFT_INCLUDE_DIRS FACESHIFT_LIBRARIES)
|
|
@ -24,7 +24,7 @@ find_path(LIBOVR_INCLUDE_DIRS OVR.h PATH_SUFFIXES Include HINTS ${LIBOVR_SEARCH_
|
||||||
find_path(LIBOVR_UTIL_INCLUDE_DIR Util_Render_Stereo.h PATH_SUFFIXES Src/Util HINTS ${LIBOVR_SEARCH_DIRS})
|
find_path(LIBOVR_UTIL_INCLUDE_DIR Util_Render_Stereo.h PATH_SUFFIXES Src/Util HINTS ${LIBOVR_SEARCH_DIRS})
|
||||||
|
|
||||||
# add the util include dir to the general include dirs
|
# add the util include dir to the general include dirs
|
||||||
set(LIBOVR_INCLUDE_DIRS "${LIBOVR_INCLUDE_DIRS}" "${LIBOVR_UTIL_INCLUDE_DIR}")
|
set(LIBOVR_INCLUDE_DIRS ${LIBOVR_INCLUDE_DIRS} ${LIBOVR_UTIL_INCLUDE_DIR})
|
||||||
|
|
||||||
if (APPLE)
|
if (APPLE)
|
||||||
find_library(LIBOVR_LIBRARY_DEBUG "Lib/MacOS/Debug/libovr.a" HINTS ${LIBOVR_SEARCH_DIRS})
|
find_library(LIBOVR_LIBRARY_DEBUG "Lib/MacOS/Debug/libovr.a" HINTS ${LIBOVR_SEARCH_DIRS})
|
||||||
|
|
|
@ -183,7 +183,7 @@ endif (FACEPLUS_FOUND AND NOT DISABLE_FACEPLUS)
|
||||||
# and with LibOVR for Oculus Rift
|
# and with LibOVR for Oculus Rift
|
||||||
if (LIBOVR_FOUND AND NOT DISABLE_LIBOVR)
|
if (LIBOVR_FOUND AND NOT DISABLE_LIBOVR)
|
||||||
add_definitions(-DHAVE_LIBOVR)
|
add_definitions(-DHAVE_LIBOVR)
|
||||||
include_directories(SYSTEM "${LIBOVR_INCLUDE_DIRS}")
|
include_directories(SYSTEM ${LIBOVR_INCLUDE_DIRS})
|
||||||
|
|
||||||
if (APPLE OR UNIX)
|
if (APPLE OR UNIX)
|
||||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${LIBOVR_INCLUDE_DIRS}")
|
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -isystem ${LIBOVR_INCLUDE_DIRS}")
|
||||||
|
|
Loading…
Reference in a new issue