diff --git a/CMakeLists.txt b/CMakeLists.txt index 7043c066..a1fd0540 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,8 +1,9 @@ cmake_minimum_required(VERSION 2.8) project(ros) find_package(catkin REQUIRED) -find_package(Boost REQUIRED COMPONENTS thread) catkin_stack() +catkin_project(ros) +find_package(Boost REQUIRED COMPONENTS thread) # Must call catkin_python_setup() early, to ensure that things like # rosunit are available in build-space, and can be found by things like @@ -30,55 +31,26 @@ add_nosetests(tools/rosclean/test) add_nosetests(tools/roscreate/test) # INSTALLATION -install(FILES stack.xml - DESTINATION share/ros) install(FILES config/rosconsole.config - DESTINATION share/ros/config) + DESTINATION ${PROJECT_SHARE_DESTINATION}/config) # setup our backwards-compatibility ROS_ROOT install(DIRECTORY core/rosbuild/ - DESTINATION share/ros/core/rosbuild + DESTINATION ${PROJECT_SHARE_DESTINATION}/core/rosbuild PATTERN ".svn" EXCLUDE PATTERN "bin" EXCLUDE ) install(PROGRAMS - core/rosbuild/bin/check_same_directories.py - core/rosbuild/bin/download_checkmd5.py - DESTINATION share/ros/core/rosbuild/bin) + core/rosbuild/bin/check_same_directories.py + core/rosbuild/bin/download_checkmd5.py + DESTINATION ${PROJECT_SHARE_DESTINATION}/core/rosbuild/bin) install(DIRECTORY core/mk/ - DESTINATION share/ros/core/mk + DESTINATION ${PROJECT_SHARE_DESTINATION}/core/mk PATTERN ".svn" EXCLUDE ) install(FILES core/roslang/cmake/roslang.cmake - DESTINATION share/roslang/cmake) - -# install all manifests -# we do them one-by-one instead of using install_matching_to_share() -# because we need to exclude some of them (e.g., mk and rosbuild are -# handled above, and some directories contains manifests that are only for -# testing.). -install(FILES core/roslang/manifest.xml DESTINATION share/roslang) -install(FILES core/roslib/manifest.xml DESTINATION share/roslib) -install(FILES tools/rosbash/manifest.xml DESTINATION share/rosbash) -install(FILES tools/rosmake/manifest.xml DESTINATION share/rosmake) -install(FILES tools/rosunit/manifest.xml DESTINATION share/rosunit) -install(FILES tools/rosclean/manifest.xml DESTINATION share/rosclean) -install(FILES tools/roscreate/manifest.xml DESTINATION share/roscreate) -install(FILES tools/rosboost_cfg/manifest.xml DESTINATION share/rosboost_cfg) - -# install python package-relative scripts -install(PROGRAMS - tools/rosunit/scripts/test_results_dir.py - tools/rosunit/scripts/summarize_results.py - tools/rosunit/scripts/rosunit - tools/rosunit/scripts/pycoverage_to_html.py - tools/rosunit/scripts/clean_junit_xml.py - tools/rosunit/scripts/check_test_ran.py - DESTINATION share/rosunit/bin) - -install(FILES stack.xml DESTINATION share/${PROJECT_NAME}) + DESTINATION share/roslang/cmake) install(DIRECTORY tools/roscreate/templates/ DESTINATION share/roscreate/templates - PATTERN ".svn" EXCLUDE - ) + PATTERN ".svn" EXCLUDE) diff --git a/core/roslib/CMakeLists.txt b/core/roslib/CMakeLists.txt index 8a3f5906..865a90bc 100644 --- a/core/roslib/CMakeLists.txt +++ b/core/roslib/CMakeLists.txt @@ -1,5 +1,9 @@ project(roslib) find_package(catkin REQUIRED COMPONENTS rospack rosunit) +catkin_project(roslib + LIBRARIES roslib + INCLUDE_DIRS include + ) include_directories(include ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS}) link_directories(${catkin_LIBRARY_DIRS}) @@ -19,21 +23,15 @@ endif() #explicitly install library and includes install(TARGETS roslib - ARCHIVE DESTINATION lib - LIBRARY DESTINATION lib + ARCHIVE DESTINATION ${PROJECT_LIB_DESTINATION} + LIBRARY DESTINATION ${PROJECT_LIB_DESTINATION} ) install(DIRECTORY include/ - DESTINATION include - FILES_MATCHING PATTERN "*.h" - PATTERN ".svn" EXCLUDE) + DESTINATION ${PROJECT_INCLUDE_DESTINATION} + FILES_MATCHING PATTERN "*.h") install(PROGRAMS scripts/gendeps - DESTINATION share/roslib/bin) - -catkin_project(roslib - LIBRARIES roslib - INCLUDE_DIRS include - ) + DESTINATION share/roslib/bin) #integration tests diff --git a/tools/rosbash/CMakeLists.txt b/tools/rosbash/CMakeLists.txt index 5611e3d9..f569fb4a 100644 --- a/tools/rosbash/CMakeLists.txt +++ b/tools/rosbash/CMakeLists.txt @@ -1,9 +1,12 @@ cmake_minimum_required(VERSION 2.8) project(rosbash) +find_package(catkin) +catkin_project(rosbash) + install(FILES rosbash rostcsh roszsh - DESTINATION share/rosbash) + DESTINATION ${PROJECT_SHARE_DESTINATION}) install(PROGRAMS scripts/rosrun - DESTINATION bin) + DESTINATION ${GLOBAL_BIN_DESTINATION}) message(STATUS " Making toplevel forward script for bash script rosrun") set(BASH_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/scripts/rosrun) diff --git a/tools/rosunit/CMakeLists.txt b/tools/rosunit/CMakeLists.txt index d666eaac..35db2cbb 100644 --- a/tools/rosunit/CMakeLists.txt +++ b/tools/rosunit/CMakeLists.txt @@ -4,3 +4,12 @@ find_package(catkin REQUIRED) catkin_project(${PROJECT_NAME} CFG_EXTRAS ${PROJECT_NAME}-extras.cmake ) + +install(PROGRAMS + scripts/test_results_dir.py + scripts/summarize_results.py + scripts/rosunit + scripts/pycoverage_to_html.py + scripts/clean_junit_xml.py + scripts/check_test_ran.py + DESTINATION share/rosunit/bin)