-
Notifications
You must be signed in to change notification settings - Fork 2
/
CMakeLists.txt
88 lines (71 loc) · 1.91 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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
cmake_minimum_required(VERSION 3.0)
project(gologpp_agent)
add_definitions(-DSOURCE_DIR=\"${CMAKE_CURRENT_SOURCE_DIR}\")
find_package(PkgConfig)
## Find catkin macros and libraries
## if COMPONENTS list like find_package(catkin REQUIRED COMPONENTS xyz)
## is used, also find other catkin packages
pkg_check_modules(readylogpp REQUIRED readylog++)
pkg_check_modules(parsegologpp REQUIRED parsegolog++)
find_package(catkin REQUIRED COMPONENTS
roscpp
rosconsole
std_msgs
genmsg
message_generation
actionlib_msgs
actionlib
)
set(gologpp_action_pkgs
turtle_actionlib
darknet_action_msgs
naoqi_wrapper_msgs
naoqi_bridge_msgs
move_base_msgs
opencv_apps_action_msgs
)
find_package(catkin OPTIONAL_COMPONENTS ${gologpp_action_pkgs})
add_definitions(-DLIBQI_VERSION=${naoqi_libqi_VERSION_MAJOR}${naoqi_libqi_VERSION_MINOR})
if(CMAKE_COMPILER_IS_GNUCC OR CMAKE_COMPILER_IS_GNUCXX)
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated-declarations -Wno-placement-new")
endif()
catkin_package(
#INCLUDE_DIRS include
#LIBRARIES ${PROJECT_NAME}
CATKIN_DEPENDS actionlib_msgs actionlib roscpp
${gologpp_action_pkgs}
)
set(BUILD_TESTS OFF CACHE BOOL "Enable gologpp tests" FORCE)
link_directories(${readylogpp_LIBRARY_DIRS} ${parsegologpp_LIBRARY_DIRS})
add_executable(gologpp_agent
src/agent_node.cpp
src/ros_backend.cpp
src/action_manager.cpp
src/exog_manager.cpp
)
target_include_directories(gologpp_agent PUBLIC
src/
${catkin_INCLUDE_DIRS}
${readylogpp_INCLUDE_DIRS}
${parsegologpp_INCLUDE_DIRS}
)
foreach(pkg ${gologpp_action_pkgs})
if ("${${pkg}_FOUND}")
target_sources(gologpp_agent PRIVATE "src/actions/gologpp_${pkg}.cpp")
target_compile_definitions(gologpp_agent PUBLIC "-D${pkg}_FOUND")
endif()
endforeach()
target_link_libraries(
gologpp_agent
roscpp
rosconsole
actionlib
${catkin_LIBRARIES}
${readylogpp_LIBRARIES}
${parsegologpp_LIBRARIES}
)
target_compile_features(
gologpp_agent
PUBLIC
cxx_std_17
)