Skip to content

Commit

Permalink
CMake install rules
Browse files Browse the repository at this point in the history
Added rules to copy files necessary for running the module with "make install".
  • Loading branch information
adynathos committed Sep 7, 2016
1 parent d386d20 commit dd1ac7b
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 20 deletions.
16 changes: 15 additions & 1 deletion bebop_description/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,18 @@ find_package(catkin REQUIRED COMPONENTS
catkin_package()

# TODO: Tests
# TODO: Install Rules

#############
## Install ##
#############

# Copy launch files
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
FILES_MATCHING PATTERN "*.launch"
)

# Copy resources
install(DIRECTORY urdf/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/urdf
)
51 changes: 33 additions & 18 deletions bebop_driver/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -131,26 +131,41 @@ add_dependencies(bebop_driver_node ${PROJECT_NAME}_gencfg)
# DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )

## Mark executables and/or libraries for installation
# install(TARGETS bebop_autonomy bebop_autonomy_node
# ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
# RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
# )
# Mark executables and/or libraries for installation
install(TARGETS ${PROJECT_NAME}_nodelet ${PROJECT_NAME}_node libbebop
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
)

## Mark cpp header files for installation
# install(DIRECTORY include/${PROJECT_NAME}/
# DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
# FILES_MATCHING PATTERN "*.h"
# PATTERN ".svn" EXCLUDE
# )
# Copy ARSDK libraries
install(DIRECTORY ${ARDRONESDK3_PATH}/lib/
DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
FILES_MATCHING PATTERN "*.so"
)

## Mark other files for installation (e.g. launch and bag files, etc.)
# install(FILES
# # myfile1
# # myfile2
# DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}
# )
# Mark cpp header files for installation
install(DIRECTORY include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
FILES_MATCHING PATTERN "*.h" PATTERN "*.hpp"
)

# Copy config files
install(DIRECTORY config/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config
)

install(DIRECTORY data/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/data
)

install(FILES nodelet_plugins.xml DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION})

# Copy launch files
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
FILES_MATCHING PATTERN "*.launch"
)

#############
## Testing ##
Expand Down
15 changes: 14 additions & 1 deletion bebop_tools/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,17 @@ catkin_package(
CATKIN_DEPENDS bebop_msgs
)

# TODO: Install Rules
#############
## Install ##
#############

# Copy launch files
install(DIRECTORY launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
FILES_MATCHING PATTERN "*.launch"
)

# Copy config files
install(DIRECTORY config/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/config
)

0 comments on commit dd1ac7b

Please sign in to comment.