-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
52 lines (40 loc) · 1.37 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
41
42
43
44
45
46
47
48
49
50
51
52
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
# Start defining the project
PROJECT (MOVE_SERVER)
# Set version numbers
SET(MOVE_SERVER_MAJOR_VERSION 1)
SET(MOVE_SERVER_MINOR_VERSION 0)
SET(MOVE_SERVER_VERSION "${MOVE_SERVER_MAJOR_VERSION}.${MOVE_SERVER_MINOR_VERSION}")
# Set cmake module path
SET(CMAKE_MODULE_PATH "${MOVE_SERVER_SOURCE_DIR}/CMakeModules;${CMAKE_MODULE_PATH}")
IF(NOT CMAKE_BUILD_TYPE)
SET (CMAKE_BUILD_TYPE RelWithDebInfo)
ENDIF(NOT CMAKE_BUILD_TYPE)
SET(OUTPUT_BINDIR ${PROJECT_BINARY_DIR}/bin)
MAKE_DIRECTORY(${OUTPUT_BINDIR})
SET(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${OUTPUT_BINDIR})
SET(MOVE_SERVER_SRC
move_udp_server.cpp
udp_physical.cpp
udp_recv.cpp
udp_tracker.cpp
Thread.cpp
)
FIND_PACKAGE(psmoveapi)
FIND_PACKAGE(OpenCV)
FIND_PACKAGE(VRPN)
INCLUDE_DIRECTORIES(${OpenCV_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${PSMOVEAPI_INCLUDE_DIR})
IF(VRPN_FOUND)
ADD_DEFINITIONS(-DWITH_VRPN)
INCLUDE_DIRECTORIES(${VRPN_INCLUDE_DIR})
SET(MOVE_SERVER_SRC ${MOVE_SERVER_SRC} VRPNServer.cpp)
ENDIF(VRPN_FOUND)
ADD_EXECUTABLE(move_server ${MOVE_SERVER_SRC})
TARGET_LINK_LIBRARIES(move_server ${PSMOVEAPI_LIBRARY})
TARGET_LINK_LIBRARIES(move_server ${PSMOVETRACKER_LIBRARY})
TARGET_LINK_LIBRARIES(move_server ${OpenCV_LIBS})
IF(VRPN_FOUND)
TARGET_LINK_LIBRARIES(move_server ${VRPN_LIBRARY})
ENDIF(VRPN_FOUND)
INSTALL(TARGETS move_server DESTINATION bin)