-
Notifications
You must be signed in to change notification settings - Fork 1
/
CMakeLists.txt
67 lines (55 loc) · 1.97 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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
cmake_minimum_required(VERSION 2.8.3)
project(openni2_tracker)
find_package(catkin REQUIRED COMPONENTS
geometry_msgs
roscpp
tf2_ros
nodelet
image_transport)
find_path(OpenNI2_INCLUDEDIR
NAMES OpenNI.h
HINTS $ENV{OPENNI2_INCLUDE})
find_library(OpenNI2_LIBRARY
NAMES OpenNI2
HINTS $ENV{OPENNI2_REDIST}
PATH_SUFFIXES lib)
find_path(Nite2_INCLUDEDIR
NAMES NiTE.h
HINTS $ENV{NITE2_INCLUDE})
find_library(Nite2_LIBRARY
NAMES NiTE2
HINTS $ENV{NITE2_REDIST64}
PATH_SUFFIXES lib)
include_directories(
${catkin_INCLUDE_DIRS}
${OpenNI2_INCLUDEDIR}
${Nite2_INCLUDEDIR})
#message(OpenNI2_INCLUDEDIR: ${OpenNI2_INCLUDEDIR})
#message(OpenNI2_LIBRARY: ${OpenNI2_LIBRARY})
#message(Nite2_INCLUDEDIR: ${Nite2_INCLUDEDIR})
#message(Nite2_LIBRARY: ${Nite2_LIBRARY})
catkin_package(
LIBRARIES openni2_tracker_nodelet
CATKIN_DEPENDS geometry_msgs roscpp tf2_ros nodelet image_transport)
add_executable(openni2_tracker src/openni2_tracker.cpp)
target_link_libraries(openni2_tracker ${catkin_LIBRARIES} ${OpenNI2_LIBRARY} ${Nite2_LIBRARY})
if(catkin_EXPORTED_TARGETS)
add_dependencies(openni2_tracker ${catkin_EXPORTED_TARGETS})
endif()
add_executable(openni2_hand_tracker src/openni2_hand_tracker.cpp)
target_link_libraries(openni2_hand_tracker ${catkin_LIBRARIES} ${OpenNI2_LIBRARY} ${Nite2_LIBRARY})
if(catkin_EXPORTED_TARGETS)
add_dependencies(openni2_hand_tracker ${catkin_EXPORTED_TARGETS})
endif()
add_library(openni2_tracker_nodelet src/openni2_tracker_nodelet.cpp)
target_link_libraries(openni2_tracker_nodelet ${catkin_LIBRARIES} ${OpenNI2_LIBRARY} ${Nite2_LIBRARY})
if(catkin_EXPORTED_TARGETS)
add_dependencies(openni2_tracker_nodelet ${catkin_EXPORTED_TARGETS})
endif()
#install(TARGETS openni2_tracker_nodelet
# DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION})
#
#install(FILES openni2_tracker_nodelet.xml
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})