-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCMakeLists.txt
35 lines (25 loc) · 996 Bytes
/
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 3.5)
PROJECT(NAVIRICE_CPP)
SET(CMAKE_CXX_STANDARD 11)
SET(SOURCE
src/navirice_image_distribution_server.cc
src/navirice_image_impl.cc
)
# Threads
FIND_PACKAGE(Threads REQUIRED)
# Protobuf
ADD_SUBDIRECTORY(proto)
# FREENECT2 for kinect
find_package(freenect2 REQUIRED)
message(STATUS "freenect2_LIBRARIES: " ${freenect2_LIBRARIES})
message(STATUS "freenect2_INCLUDE_DIR: " ${freenect2_INCLUDE_DIR})
INCLUDE_DIRECTORIES(${CMAKE_CURRENT_BINARY_DIR})
#proto_lib is taken from proto directory
ADD_EXECUTABLE(test_program test_program.cc ${SOURCE})
TARGET_LINK_LIBRARIES(test_program ${CMAKE_THREAD_LIBS_INIT})
TARGET_LINK_LIBRARIES(test_program proto_lib)
ADD_EXECUTABLE(kinect_server kinect_server.cc ${SOURCE})
TARGET_LINK_LIBRARIES(kinect_server ${CMAKE_THREAD_LIBS_INIT})
TARGET_INCLUDE_DIRECTORIES(kinect_server PUBLIC ${freenect2_INCLUDE_DIR})
TARGET_LINK_LIBRARIES(kinect_server ${freenect2_LIBRARIES})
TARGET_LINK_LIBRARIES(kinect_server proto_lib)