-
Notifications
You must be signed in to change notification settings - Fork 0
/
CMakeLists.txt
33 lines (25 loc) · 1.25 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
cmake_minimum_required(VERSION 2.8.12)
project(WiimotePlugin)
# in the CMake GUI or command line.
find_package(osvr REQUIRED)
set(BUILD_WIIUSE_SHARED_LIB OFF CACHE BOOL "Should we build as a shared library (dll/so)?")
add_definitions("-DWIIUSE_STATIC")
set(BUILD_EXAMPLE OFF CACHE BOOL "Should we build the example app?")
set(BUILD_EXAMPLE_SDL OFF CACHE BOOL "Should we build the SDL-based example app?")
set(INSTALL_EXAMPLES OFF CACHE BOOL "Should we install the example apps?")
list(APPEND CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/vendor/wiiuse/cmake")
SET (CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC")
SET (CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -fPIC")
add_subdirectory("vendor/wiiuse")
osvr_convert_json(je_nourish_wiimote_json
je_nourish_wiimote.json
"${CMAKE_CURRENT_BINARY_DIR}/je_nourish_wiimote_json.h")
include_directories("${CMAKE_CURRENT_BINARY_DIR}")
include_directories("${CMAKE_CURRENT_SOURCE_DIR}/vendor/wiiuse/src")
osvr_add_plugin(NAME je_nourish_wiimote
CPP # indicates we'd like to use the C++ wrapper
SOURCES
je_nourish_wiimote.cpp
"${CMAKE_CURRENT_BINARY_DIR}/je_nourish_wiimote_json.h")
# If you use other libraries, find them and add a line like:
target_link_libraries(je_nourish_wiimote wiiuse)