use install destination variables

This commit is contained in:
Dirk Thomas 2012-09-03 19:08:31 +00:00
parent 9ddc5d80c8
commit 64e8db7f30
4 changed files with 33 additions and 51 deletions

View File

@ -1,8 +1,9 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
project(ros) project(ros)
find_package(catkin REQUIRED) find_package(catkin REQUIRED)
find_package(Boost REQUIRED COMPONENTS thread)
catkin_stack() catkin_stack()
catkin_project(ros)
find_package(Boost REQUIRED COMPONENTS thread)
# Must call catkin_python_setup() early, to ensure that things like # Must call catkin_python_setup() early, to ensure that things like
# rosunit are available in build-space, and can be found by 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) add_nosetests(tools/roscreate/test)
# INSTALLATION # INSTALLATION
install(FILES stack.xml
DESTINATION share/ros)
install(FILES config/rosconsole.config install(FILES config/rosconsole.config
DESTINATION share/ros/config) DESTINATION ${PROJECT_SHARE_DESTINATION}/config)
# setup our backwards-compatibility ROS_ROOT # setup our backwards-compatibility ROS_ROOT
install(DIRECTORY core/rosbuild/ install(DIRECTORY core/rosbuild/
DESTINATION share/ros/core/rosbuild DESTINATION ${PROJECT_SHARE_DESTINATION}/core/rosbuild
PATTERN ".svn" EXCLUDE PATTERN ".svn" EXCLUDE
PATTERN "bin" EXCLUDE PATTERN "bin" EXCLUDE
) )
install(PROGRAMS install(PROGRAMS
core/rosbuild/bin/check_same_directories.py core/rosbuild/bin/check_same_directories.py
core/rosbuild/bin/download_checkmd5.py core/rosbuild/bin/download_checkmd5.py
DESTINATION share/ros/core/rosbuild/bin) DESTINATION ${PROJECT_SHARE_DESTINATION}/core/rosbuild/bin)
install(DIRECTORY core/mk/ install(DIRECTORY core/mk/
DESTINATION share/ros/core/mk DESTINATION ${PROJECT_SHARE_DESTINATION}/core/mk
PATTERN ".svn" EXCLUDE PATTERN ".svn" EXCLUDE
) )
install(FILES core/roslang/cmake/roslang.cmake install(FILES core/roslang/cmake/roslang.cmake
DESTINATION share/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})
install(DIRECTORY tools/roscreate/templates/ install(DIRECTORY tools/roscreate/templates/
DESTINATION share/roscreate/templates DESTINATION share/roscreate/templates
PATTERN ".svn" EXCLUDE PATTERN ".svn" EXCLUDE)
)

View File

@ -1,5 +1,9 @@
project(roslib) project(roslib)
find_package(catkin REQUIRED COMPONENTS rospack rosunit) find_package(catkin REQUIRED COMPONENTS rospack rosunit)
catkin_project(roslib
LIBRARIES roslib
INCLUDE_DIRS include
)
include_directories(include ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS}) include_directories(include ${Boost_INCLUDE_DIRS} ${catkin_INCLUDE_DIRS})
link_directories(${catkin_LIBRARY_DIRS}) link_directories(${catkin_LIBRARY_DIRS})
@ -19,21 +23,15 @@ endif()
#explicitly install library and includes #explicitly install library and includes
install(TARGETS roslib install(TARGETS roslib
ARCHIVE DESTINATION lib ARCHIVE DESTINATION ${PROJECT_LIB_DESTINATION}
LIBRARY DESTINATION lib LIBRARY DESTINATION ${PROJECT_LIB_DESTINATION}
) )
install(DIRECTORY include/ install(DIRECTORY include/
DESTINATION include DESTINATION ${PROJECT_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h" FILES_MATCHING PATTERN "*.h")
PATTERN ".svn" EXCLUDE)
install(PROGRAMS scripts/gendeps install(PROGRAMS scripts/gendeps
DESTINATION share/roslib/bin) DESTINATION share/roslib/bin)
catkin_project(roslib
LIBRARIES roslib
INCLUDE_DIRS include
)
#integration tests #integration tests

View File

@ -1,9 +1,12 @@
cmake_minimum_required(VERSION 2.8) cmake_minimum_required(VERSION 2.8)
project(rosbash) project(rosbash)
find_package(catkin)
catkin_project(rosbash)
install(FILES rosbash rostcsh roszsh install(FILES rosbash rostcsh roszsh
DESTINATION share/rosbash) DESTINATION ${PROJECT_SHARE_DESTINATION})
install(PROGRAMS scripts/rosrun install(PROGRAMS scripts/rosrun
DESTINATION bin) DESTINATION ${GLOBAL_BIN_DESTINATION})
message(STATUS " Making toplevel forward script for bash script rosrun") message(STATUS " Making toplevel forward script for bash script rosrun")
set(BASH_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/scripts/rosrun) set(BASH_SCRIPT ${CMAKE_CURRENT_SOURCE_DIR}/scripts/rosrun)

View File

@ -4,3 +4,12 @@ find_package(catkin REQUIRED)
catkin_project(${PROJECT_NAME} catkin_project(${PROJECT_NAME}
CFG_EXTRAS ${PROJECT_NAME}-extras.cmake 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)