Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit f484f24

Browse files
author
Davide Faconti
committed
Fixing catkin build
1 parent 2e27e8e commit f484f24

File tree

6 files changed

+25
-38
lines changed

6 files changed

+25
-38
lines changed

CMakeLists.txt

Lines changed: 9 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,7 @@ cmake_minimum_required(VERSION 2.8)
22
project(behavior_tree_core)
33

44
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -pthread -Werror=return-type")
5-
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
6-
5+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_LIST_DIR}/cmake")
76
#############################################################
87
# http://answers.ros.org/question/230877/optionally-build-a-package-with-catkin/
98
#
@@ -93,12 +92,19 @@ else()
9392
endif()
9493

9594
######################################################
96-
# COMPILING LIBRARY
95+
# LIBRARY
9796
######################################################
9897
add_library(behavior_tree_core STATIC ${BT_Source} )
9998
target_compile_options(behavior_tree_core PRIVATE "-fPIC")
10099
target_link_libraries(behavior_tree_core dl)
101100

101+
######################################################
102+
# EXAMPLES and TOOLS
103+
######################################################
104+
105+
add_subdirectory(tools)
106+
add_subdirectory(sample_nodes)
107+
add_subdirectory(examples)
102108

103109
######################################################
104110
# TESTS
@@ -134,23 +140,6 @@ elseif(GTEST_FOUND)
134140

135141
endif()
136142

137-
######################################################
138-
# COMPILING EXAMPLES and TOOLS
139-
######################################################
140-
141-
add_executable(bt_log_cat tools/bt_log_cat.cpp )
142-
target_link_libraries(bt_log_cat ${BEHAVIOR_TREE_LIBRARIES} )
143-
144-
if( ZMQ_FOUND )
145-
add_executable(bt_recorder tools/bt_recorder.cpp )
146-
target_link_libraries(bt_recorder ${BEHAVIOR_TREE_LIBRARIES} )
147-
endif()
148-
149-
add_executable(bt_plugin_manifest tools/bt_plugin_manifest.cpp )
150-
target_link_libraries(bt_plugin_manifest ${BEHAVIOR_TREE_LIBRARIES} )
151-
152143

153-
add_subdirectory(sample_nodes)
154-
add_subdirectory(examples)
155144

156145

cmake/FindZMQ.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ else (ZMQ_LIBRARIES AND ZMQ_INCLUDE_DIRS)
2525
/usr/include
2626
/usr/local/include
2727
/opt/local/include
28-
/sw/include
2928
)
3029

3130
find_library(ZMQ_LIBRARY

examples/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,4 @@
11
cmake_minimum_required(VERSION 2.8)
2-
project(behavior_tree_core)
3-
4-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -Werror=return-type")
5-
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_SOURCE_DIR}/cmake")
6-
7-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
8-
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
9-
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
102

113

124
include_directories( ../include ../sample_nodes )
@@ -33,6 +25,5 @@ target_link_libraries(t03_sequence_star movebase_node dummy_nodes ${BEHAVIOR_TRE
3325
add_executable(t04_blackboard t04_blackboard.cpp )
3426
target_link_libraries(t04_blackboard movebase_node ${BEHAVIOR_TREE_LIBRARIES} )
3527

36-
3728
add_executable(t05_crossdoor t05_crossdoor.cpp )
3829
target_link_libraries(t05_crossdoor crossdoor_nodes ${BEHAVIOR_TREE_LIBRARIES} )

package.xml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<package>
22
<name>behavior_tree_core</name>
3-
<version>0.1.0</version>
3+
<version>2.0.0</version>
44
<description>
55
This package provides a behavior trees core.
66
</description>
@@ -11,6 +11,7 @@
1111
<license>MIT</license>
1212

1313
<author>Michele Colledanchise</author>
14+
<author>Davide Faconti</author>
1415

1516
<buildtool_depend>catkin</buildtool_depend>
1617

sample_nodes/CMakeLists.txt

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,4 @@
11
cmake_minimum_required(VERSION 2.8)
2-
project(behavior_tree_core)
3-
4-
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall -std=c++11 -Werror=return-type")
5-
6-
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
7-
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
8-
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
92

103
include_directories( ../include )
114

tools/CMakeLists.txt

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
cmake_minimum_required(VERSION 2.8)
2+
3+
include_directories( ../include )
4+
5+
add_executable(bt_log_cat bt_log_cat.cpp )
6+
target_link_libraries(bt_log_cat ${BEHAVIOR_TREE_LIBRARIES} )
7+
8+
if( ZMQ_FOUND )
9+
add_executable(bt_recorder bt_recorder.cpp )
10+
target_link_libraries(bt_recorder ${BEHAVIOR_TREE_LIBRARIES} )
11+
endif()
12+
13+
add_executable(bt_plugin_manifest bt_plugin_manifest.cpp )
14+
target_link_libraries(bt_plugin_manifest ${BEHAVIOR_TREE_LIBRARIES} )

0 commit comments

Comments
 (0)