mirror of
https://thingvellir.net/git/overte
synced 2025-03-27 23:52:03 +01:00
Starting on Faceplus integration.
This commit is contained in:
parent
220ccdf163
commit
98011da1ef
3 changed files with 60 additions and 0 deletions
42
cmake/modules/FindFaceplus.cmake
Normal file
42
cmake/modules/FindFaceplus.cmake
Normal file
|
@ -0,0 +1,42 @@
|
|||
# Try to find the Faceplus library
|
||||
#
|
||||
# You must provide a FACEPLUS_ROOT_DIR which contains lib and include directories
|
||||
#
|
||||
# Once done this will define
|
||||
#
|
||||
# FACEPLUS_FOUND - system found Faceplus
|
||||
# FACEPLUS_INCLUDE_DIRS - the Faceplus include directory
|
||||
# FACEPLUS_LIBRARIES - Link this to use Faceplus
|
||||
#
|
||||
# Created on 4/8/2014 by Andrzej Kapolka
|
||||
# Copyright (c) 2014 High Fidelity
|
||||
#
|
||||
|
||||
if (FACEPLUS_LIBRARIES AND FACEPLUS_INCLUDE_DIRS)
|
||||
# in cache already
|
||||
set(FACEPLUS_FOUND TRUE)
|
||||
else (FACEPLUS_LIBRARIES AND FACEPLUS_INCLUDE_DIRS)
|
||||
find_path(FACEPLUS_INCLUDE_DIRS faceplus.h ${FACEPLUS_ROOT_DIR}/include)
|
||||
|
||||
if (WIN32)
|
||||
find_library(FACEPLUS_LIBRARIES faceplus.lib ${FACEPLUS_ROOT_DIR}/win32/)
|
||||
endif (WIN32)
|
||||
|
||||
if (FACEPLUS_INCLUDE_DIRS AND FACEPLUS_LIBRARIES)
|
||||
set(FACEPLUS_FOUND TRUE)
|
||||
endif (FACEPLUS_INCLUDE_DIRS AND FACEPLUS_LIBRARIES)
|
||||
|
||||
if (FACEPLUS_FOUND)
|
||||
if (NOT FACEPLUS_FIND_QUIETLY)
|
||||
message(STATUS "Found Faceplus... ${FACEPLUS_LIBRARIES}")
|
||||
endif (NOT FACEPLUS_FIND_QUIETLY)
|
||||
else ()
|
||||
if (FACEPLUS_FIND_REQUIRED)
|
||||
message(FATAL_ERROR "Could not find Faceplus")
|
||||
endif (FACEPLUS_FIND_REQUIRED)
|
||||
endif ()
|
||||
|
||||
# show the FACEPLUS_INCLUDE_DIRS and FACEPLUS_LIBRARIES variables only in the advanced view
|
||||
mark_as_advanced(FACEPLUS_INCLUDE_DIRS FACEPLUS_LIBRARIES)
|
||||
|
||||
endif (FACEPLUS_LIBRARIES AND FACEPLUS_INCLUDE_DIRS)
|
|
@ -12,6 +12,7 @@ project(${TARGET_NAME})
|
|||
|
||||
# setup for find modules
|
||||
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/../cmake/modules/")
|
||||
set(FACEPLUS_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external/faceplus")
|
||||
set(FACESHIFT_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external/faceshift")
|
||||
set(LIBOVR_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external/oculus")
|
||||
set(SIXENSE_ROOT_DIR "${CMAKE_CURRENT_SOURCE_DIR}/external/Sixense")
|
||||
|
@ -130,6 +131,7 @@ link_hifi_library(audio ${TARGET_NAME} "${ROOT_DIR}")
|
|||
link_hifi_library(script-engine ${TARGET_NAME} "${ROOT_DIR}")
|
||||
|
||||
# find any optional libraries
|
||||
find_package(Faceplus)
|
||||
find_package(Faceshift)
|
||||
find_package(LibOVR)
|
||||
find_package(Sixense)
|
||||
|
@ -163,6 +165,13 @@ if (VISAGE_FOUND AND NOT DISABLE_VISAGE)
|
|||
target_link_libraries(${TARGET_NAME} "${VISAGE_LIBRARIES}")
|
||||
endif (VISAGE_FOUND AND NOT DISABLE_VISAGE)
|
||||
|
||||
# and with Faceplus library, also for webcam feature tracking
|
||||
if (FACEPLUS_FOUND AND NOT DISABLE_FACEPLUS)
|
||||
add_definitions(-DHAVE_FACEPLUS)
|
||||
include_directories(SYSTEM "${FACEPLUS_INCLUDE_DIRS}")
|
||||
target_link_libraries(${TARGET_NAME} "${FACEPLUS_LIBRARIES}")
|
||||
endif (FACEPLUS_FOUND AND NOT DISABLE_FACEPLUS)
|
||||
|
||||
# and with LibOVR for Oculus Rift
|
||||
if (LIBOVR_FOUND AND NOT DISABLE_LIBOVR)
|
||||
add_definitions(-DHAVE_LIBOVR)
|
||||
|
|
9
interface/external/faceplus/readme.txt
vendored
Normal file
9
interface/external/faceplus/readme.txt
vendored
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
Instructions for adding the Faceplus driver to Interface
|
||||
Andrzej Kapolka, April 8, 2014
|
||||
|
||||
1. Copy the Faceplus sdk folders (include, win32) into the interface/external/faceplus folder.
|
||||
This readme.txt should be there as well.
|
||||
|
||||
2. Delete your build directory, run cmake and build, and you should be all set.
|
||||
|
Loading…
Reference in a new issue