-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCMakeLists.txt
More file actions
executable file
·103 lines (87 loc) · 2.16 KB
/
CMakeLists.txt
File metadata and controls
executable file
·103 lines (87 loc) · 2.16 KB
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
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
cmake_minimum_required(VERSION 3.5.0)
set(CMAKE_CXX_FLAGS "-Wswitch -std=c++0x -pthread ${CMAKE_CXX_FLAGS} -Wno-undef -lspdlog")
set(CMAKE_CXX_STANDARD 17)
project(knowrob_ros
DESCRIPTION "A Knowledge Base System for Cognition-enabled Robots")
IF (NOT WIN32)
INCLUDE(FindPkgConfig)
ENDIF ()
find_package(catkin REQUIRED COMPONENTS
roscpp
rospy
std_msgs
message_generation
actionlib
actionlib_msgs
knowrob
)
find_package(spdlog REQUIRED)
find_package(rostest REQUIRED)
catkin_python_setup()
## =============================
## ROS message generation
## =============================
add_message_files(
DIRECTORY msg
FILES
KeyValuePair.msg
ModalFrame.msg
Triple.msg
TellMessage.msg
GraphQueryMessage.msg
GraphAnswerMessage.msg
)
add_action_files(
DIRECTORY action
FILES
AskAll.action
AskOne.action
AskIncremental.action
AskIncrementalNextSolution.action
Tell.action
)
add_service_files(
DIRECTORY srv
FILES
AskIncrementalFinish.srv
ExportTriples.srv
)
generate_messages(DEPENDENCIES
std_msgs
actionlib_msgs
)
## =============================
## Catkin package
## =============================
catkin_package(CATKIN_DEPENDS roscpp roslib rospy knowrob message_runtime)
include_directories(include ${catkin_INCLUDE_DIRS})
## ROS Interface ###
add_executable(knowrob-ros
src/ROSInterface.cpp
)
add_dependencies(knowrob-ros
${catkin_EXPORTED_TARGETS}
knowrob_ros_generate_messages_cpp
)
target_link_libraries(knowrob-ros ${catkin_LIBRARIES} spdlog::spdlog)
## =============================
## Python library installation
## =============================
# list all executable python and shell scripts for installation
install(PROGRAMS
scripts/*
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)
## =============================
## Install binaries
## =============================
install(TARGETS knowrob-ros RUNTIME DESTINATION bin)
## =============================
## Install test files
## =============================
if (CATKIN_ENABLE_TESTING)
catkin_add_nosetests(
test/test_knowrob_ros_lib.test
DEPENDENCIES ${catkin_EXPORTED_TARGETS}
)
endif()