forked from ros-controls/control_toolbox
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request ros-controls#19 from ros-controls/no-rosbuild
Remove rosbuild artifacts. Fixes ros-controls#16.
- Loading branch information
Showing
3 changed files
with
63 additions
and
122 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,116 +1,85 @@ | ||
cmake_minimum_required(VERSION 2.8.3) | ||
project(control_toolbox) | ||
|
||
if(USE_ROSBUILD) | ||
include($ENV{ROS_ROOT}/core/rosbuild/rosbuild.cmake) | ||
rosbuild_init() | ||
#rosbuild_genmsg() | ||
rosbuild_gensrv() | ||
|
||
#dynamic reconfigure | ||
rosbuild_find_ros_package(dynamic_reconfigure) | ||
include(${dynamic_reconfigure_PACKAGE_PATH}/cmake/cfgbuild.cmake) | ||
gencfg() | ||
# Load catkin and all dependencies required for this package | ||
find_package(catkin REQUIRED COMPONENTS | ||
cmake_modules | ||
message_generation | ||
roscpp | ||
dynamic_reconfigure | ||
realtime_tools | ||
std_msgs | ||
) | ||
|
||
rosbuild_add_library(${PROJECT_NAME} | ||
src/pid.cpp | ||
src/pid_gains_setter.cpp | ||
src/sine_sweep.cpp | ||
src/dither.cpp | ||
src/sinusoid.cpp | ||
src/limited_proxy.cpp | ||
) | ||
target_link_libraries(${PROJECT_NAME} tinyxml) | ||
find_package(Boost REQUIRED COMPONENTS system thread) | ||
find_package(TinyXML REQUIRED) | ||
|
||
# rosbuild_add_executable(test_linear test/linear.cpp) | ||
# Dynamics reconfigure | ||
generate_dynamic_reconfigure_options( | ||
cfg/Parameters.cfg | ||
) | ||
|
||
# Tests | ||
rosbuild_add_gtest(test/pid_tests test/pid_tests.cpp) | ||
target_link_libraries(test/pid_tests ${PROJECT_NAME}) | ||
# Add services and generate them | ||
add_service_files( | ||
FILES | ||
SetPidGains.srv | ||
) | ||
|
||
else() | ||
generate_messages( | ||
DEPENDENCIES std_msgs | ||
) | ||
|
||
# Load catkin and all dependencies required for this package | ||
find_package(catkin REQUIRED COMPONENTS | ||
cmake_modules | ||
message_generation | ||
# Declare catkin package | ||
catkin_package( | ||
DEPENDS TinyXML | ||
CATKIN_DEPENDS | ||
roscpp | ||
dynamic_reconfigure | ||
realtime_tools | ||
message_runtime | ||
std_msgs | ||
) | ||
|
||
find_package(Boost REQUIRED COMPONENTS system thread) | ||
find_package(TinyXML REQUIRED) | ||
|
||
# Dynamics reconfigure | ||
generate_dynamic_reconfigure_options( | ||
cfg/Parameters.cfg | ||
) | ||
|
||
# Add services and generate them | ||
add_service_files( | ||
FILES | ||
SetPidGains.srv | ||
) | ||
|
||
generate_messages( | ||
DEPENDENCIES std_msgs | ||
INCLUDE_DIRS include | ||
LIBRARIES ${PROJECT_NAME} | ||
) | ||
|
||
# Declare catkin package | ||
catkin_package( | ||
DEPENDS TinyXML | ||
CATKIN_DEPENDS | ||
roscpp | ||
dynamic_reconfigure | ||
realtime_tools | ||
message_runtime | ||
std_msgs | ||
INCLUDE_DIRS include | ||
LIBRARIES ${PROJECT_NAME} | ||
) | ||
|
||
include_directories( | ||
include | ||
${catkin_INCLUDE_DIRS} | ||
${Boost_INCLUDE_DIR} | ||
${TinyXML_INCLUDE_DIRS} | ||
) | ||
|
||
add_library(${PROJECT_NAME} | ||
src/pid.cpp | ||
src/pid_gains_setter.cpp | ||
src/sine_sweep.cpp | ||
src/dither.cpp | ||
src/sinusoid.cpp | ||
src/limited_proxy.cpp | ||
) | ||
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencfg) # wait for dynamic reconfigure | ||
include_directories( | ||
include | ||
${catkin_INCLUDE_DIRS} | ||
${Boost_INCLUDE_DIR} | ||
${TinyXML_INCLUDE_DIRS} | ||
) | ||
|
||
target_link_libraries(${PROJECT_NAME} ${TinyXML_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) | ||
add_library(${PROJECT_NAME} | ||
src/pid.cpp | ||
src/pid_gains_setter.cpp | ||
src/sine_sweep.cpp | ||
src/dither.cpp | ||
src/sinusoid.cpp | ||
src/limited_proxy.cpp | ||
) | ||
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencfg) # wait for dynamic reconfigure | ||
|
||
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencpp) # wait for msgs | ||
target_link_libraries(${PROJECT_NAME} ${TinyXML_LIBRARIES} ${catkin_LIBRARIES} ${Boost_LIBRARIES}) | ||
|
||
if(CATKIN_ENABLE_TESTING) | ||
# Tests | ||
catkin_add_gtest(pid_tests test/pid_tests.cpp) | ||
target_link_libraries(pid_tests ${catkin_LIBRARIES} ${PROJECT_NAME}) | ||
add_dependencies(${PROJECT_NAME} ${PROJECT_NAME}_gencpp) # wait for msgs | ||
|
||
# add_executable(test_linear test/linear.cpp) | ||
endif() | ||
if(CATKIN_ENABLE_TESTING) | ||
# Tests | ||
catkin_add_gtest(pid_tests test/pid_tests.cpp) | ||
target_link_libraries(pid_tests ${catkin_LIBRARIES} ${PROJECT_NAME}) | ||
|
||
# Install | ||
install(DIRECTORY include/${PROJECT_NAME}/ | ||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) | ||
# add_executable(test_linear test/linear.cpp) | ||
endif() | ||
|
||
install(TARGETS ${PROJECT_NAME} | ||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
) | ||
# Install | ||
install(DIRECTORY include/${PROJECT_NAME}/ | ||
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}) | ||
|
||
install(DIRECTORY scripts/ | ||
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) | ||
install(TARGETS ${PROJECT_NAME} | ||
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION} | ||
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION} | ||
) | ||
|
||
endif() | ||
install(DIRECTORY scripts/ | ||
DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}) |
This file was deleted.
Oops, something went wrong.