Skip to content

Commit 4f5a822

Browse files
committed
Duplicate CMakeLists.txt history in ../twist_controller/ history.
1 parent 8844b54 commit 4f5a822

File tree

1 file changed

+69
-0
lines changed

1 file changed

+69
-0
lines changed

twist_controller/CMakeLists.txt

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
cmake_minimum_required(VERSION 3.8)
2+
project(kortex2_controllers)
3+
4+
if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
5+
add_compile_options(-Wall -Wextra -Wpedantic)
6+
endif()
7+
8+
# find dependencies
9+
find_package(ament_cmake REQUIRED)
10+
find_package(ament_cmake_ros REQUIRED)
11+
find_package(controller_interface REQUIRED)
12+
find_package(geometry_msgs REQUIRED)
13+
find_package(example_interfaces REQUIRED)
14+
find_package(rclcpp REQUIRED)
15+
find_package(realtime_tools REQUIRED)
16+
17+
set(THIS_PACKAGE_INCLUDE_DEPENDS
18+
controller_interface
19+
geometry_msgs
20+
example_interfaces
21+
realtime_tools
22+
)
23+
24+
include_directories(include)
25+
26+
add_library(${PROJECT_NAME} SHARED src/twist_controller.cpp src/fault_controller.cpp)
27+
target_include_directories(${PROJECT_NAME} PRIVATE
28+
include
29+
)
30+
31+
ament_target_dependencies(${PROJECT_NAME}
32+
${THIS_PACKAGE_INCLUDE_DEPENDS}
33+
)
34+
35+
# Causes the visibility macros to use dllexport rather than dllimport,
36+
# which is appropriate when building the dll but not consuming it.
37+
target_compile_definitions(${PROJECT_NAME} PRIVATE "KORTEX2_CONTROLLERS_BUILDING_LIBRARY")
38+
pluginlib_export_plugin_description_file(controller_interface controller_plugins.xml)
39+
40+
install(TARGETS ${PROJECT_NAME}
41+
ARCHIVE DESTINATION lib
42+
LIBRARY DESTINATION lib
43+
RUNTIME DESTINATION bin
44+
)
45+
46+
install(DIRECTORY include/
47+
DESTINATION include
48+
)
49+
50+
install(FILES controller_plugins.xml
51+
DESTINATION share/${PROJECT_NAME}
52+
)
53+
54+
if(BUILD_TESTING)
55+
endif()
56+
57+
ament_export_dependencies(${THIS_PACKAGE_INCLUDE_DEPENDS})
58+
ament_export_include_directories(include)
59+
ament_export_libraries(${PROJECT_NAME})
60+
61+
ament_export_include_directories(
62+
include
63+
)
64+
65+
ament_export_libraries(
66+
${PROJECT_NAME}
67+
)
68+
69+
ament_package()

0 commit comments

Comments
 (0)