-
Notifications
You must be signed in to change notification settings - Fork 16
/
Copy pathCMakeLists.txt
40 lines (36 loc) · 1.19 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
cmake_minimum_required(VERSION 2.8.3)
project(openni2_tracker)
find_package(catkin REQUIRED COMPONENTS geometry_msgs
orocos_kdl
roscpp
roslib
tf)
# Find OpenNI2
#find_package(PkgConfig)
#pkg_check_modules(OpenNI2 REQUIRED libopenni2)
find_path(OpenNI2_INCLUDEDIR
NAMES OpenNI.h
HINTS /usr/include/openni2)
find_library(OpenNI2_LIBRARIES
NAMES OpenNI2 DummyDevice OniFile PS1090
HINTS /usr/lib/ /usr/lib/OpenNI2/Drivers
PATH_SUFFIXES lib)
message(STATUS ${OpenNI2_LIBRARIES})
# Find Nite2
message(status $ENV{NITE2_INCLUDE})
message(status $ENV{NITE2_REDIST64})
find_path(Nite2_INCLUDEDIR
NAMES NiTE.h
HINTS $ENV{NITE2_INCLUDE})
find_library(Nite2_LIBRARY
NAMES NiTE2
HINTS $ENV{NITE2_REDIST64}
PATH_SUFFIXES lib)
catkin_package()
include_directories(${catkin_INCLUDEDIR}
${OpenNI2_INCLUDEDIR}
${Nite2_INCLUDEDIR})
add_executable(openni2_tracker src/openni2_tracker.cpp)
target_link_libraries(openni2_tracker ${catkin_LIBRARIES} ${OpenNI2_LIBRARIES} ${Nite2_LIBRARY})
install(TARGETS openni2_tracker RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
install(FILES openni2_tracker.xml DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})