-
Notifications
You must be signed in to change notification settings - Fork 12
/
CMakeLists.txt
68 lines (58 loc) · 1.56 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
68
cmake_minimum_required(VERSION 2.8.3)
project(xiaoqiang_track)
include(CheckCXXCompilerFlag)
CHECK_CXX_COMPILER_FLAG("-std=c++11" COMPILER_SUPPORTS_CXX11)
if(COMPILER_SUPPORTS_CXX11)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
add_definitions(-DCOMPILEDWITHC11)
message(STATUS "Using flag -std=c++11.")
else()
message(FATAL_ERROR "The compiler ${CMAKE_CXX_COMPILER} has no C++11 support. Please use a different C++ compiler.")
endif()
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
sensor_msgs
message_generation
cv_bridge
)
find_package(OpenCV 3.2.0 REQUIRED)
find_package(PkgConfig REQUIRED)
find_package(OpenSSL REQUIRED)
pkg_check_modules(JSONCPP REQUIRED jsoncpp)
pkg_check_modules(CURL REQUIRED libcurl)
include_directories(
${catkin_INCLUDE_DIRS}
${OpenCV_INCLIDE_DIRS}
${JSONCPP_INCLUDE_DIRS}
${OPENSSL_INCLUDE_DIR}
${PROJECT_SOURCE_DIR}/include
${PROJECT_SOURCE_DIR}/src
)
add_message_files(
FILES
TrackTarget.msg
)
generate_messages(
DEPENDENCIES
std_msgs
sensor_msgs
)
catkin_package(
CATKIN_DEPENDS roscpp rospy std_msgs sensor_msgs message_generation cv_bridge message_runtime
)
add_executable(tracking_node
${PROJECT_SOURCE_DIR}/src/tracking_node.cpp
${PROJECT_SOURCE_DIR}/src/baidu_track.cpp
${PROJECT_SOURCE_DIR}/src/tracker.cpp
${PROJECT_SOURCE_DIR}/src/body_pose_track.cpp
)
add_dependencies(tracking_node ${${PROJECT_NAME}_EXPORTED_TARGETS})
target_link_libraries(tracking_node
${catkin_LIBRARIES}
${OpenCV_LIBS}
${JSONCPP_LIBRARIES}
${OPENSSL_LIBRARIES}
${CURL_LIBRARIES}
)