-
Notifications
You must be signed in to change notification settings - Fork 4
/
CMakeLists.txt
40 lines (32 loc) · 1.21 KB
/
CMakeLists.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# FOVE plugin for OSVR
cmake_minimum_required(VERSION 3.1.0)
project(Fove_OSVR_plugin)
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake")
# Find OSVR
# Add default OSVR paths just to increase the chance things work by default
# If OSVR can't be found, the user can point to the osvr/cmake dir from cmake
if (WIN32)
list(APPEND CMAKE_PREFIX_PATH "C:/Program Files/OSVR/SDK/x64/lib/cmake")
endif()
find_package(osvr REQUIRED)
find_package(FOVE REQUIRED)
osvr_convert_json(com_osvr_fove_eyetracker_json
com_osvr_fove_eyetracker.json
"${CMAKE_CURRENT_BINARY_DIR}/com_osvr_fove_eyetracker_json.h")
osvr_convert_json(com_osvr_fove_tracker_json
com_osvr_fove_tracker.json
"${CMAKE_CURRENT_BINARY_DIR}/com_osvr_fove_tracker_json.h")
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
# Generate OSVR plugin DLL
osvr_add_plugin(NAME com_Sensics_FOVE SOURCES
com_osvr_fove.cpp
"${CMAKE_CURRENT_BINARY_DIR}/com_osvr_fove_eyetracker_json.h"
"${CMAKE_CURRENT_BINARY_DIR}/com_osvr_fove_tracker_json.h"
)
target_link_libraries(com_Sensics_FOVE
osvr::osvrUtilCpp
osvr::osvrPluginKitCpp
${FOVE_LIBRARIES})
target_include_directories(com_Sensics_FOVE
PUBLIC
${FOVE_INCLUDE_DIRS})