Skip to content

Commit

Permalink
Added install targets to CMakeLists.txt for allowing the generation o…
Browse files Browse the repository at this point in the history
…f .deb packages.
  • Loading branch information
carlosmccosta committed Sep 22, 2019
1 parent 48a7d27 commit 39a0960
Show file tree
Hide file tree
Showing 2 changed files with 91 additions and 32 deletions.
119 changes: 89 additions & 30 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ set(${PROJECT_NAME}_CATKIN_COMPONENTS
tf2_ros
)

find_package(catkin REQUIRED COMPONENTS ${${PROJECT_NAME}_CATKIN_COMPONENTS})
find_package(Eigen3 REQUIRED)

find_package(Boost REQUIRED)
find_package(Eigen3 REQUIRED)
find_package(catkin REQUIRED COMPONENTS ${${PROJECT_NAME}_CATKIN_COMPONENTS})



Expand All @@ -35,8 +36,10 @@ catkin_package(
INCLUDE_DIRS
include
LIBRARIES
polar_to_cartesian_matrix_cache
tf_rosmsg_eigen_conversions
tf_collector laserscan_to_pointcloud
tf_collector
laserscan_to_pointcloud
CATKIN_DEPENDS
${${PROJECT_NAME}_CATKIN_COMPONENTS}
DEPENDS
Expand All @@ -50,9 +53,9 @@ catkin_package(
## Build ##
###########

#==================
# includes
#==================
#===========
# includes =
#===========

include_directories(
include
Expand All @@ -62,9 +65,13 @@ include_directories(
)


#==================
# libraries
#==================
#============
# libraries =
#============

add_library(polar_to_cartesian_matrix_cache
src/polar_to_cartesian_matrix_cache.cpp
)

add_library(tf_rosmsg_eigen_conversions
src/tf_rosmsg_eigen_conversions.cpp
Expand All @@ -78,14 +85,10 @@ add_library(laserscan_to_pointcloud
src/laserscan_to_pointcloud.cpp
)

add_library(polar_to_cartesian_matrix_cache
src/polar_to_cartesian_matrix_cache.cpp
)


#==================
# executables
#==================
#==============
# executables =
#==============

add_executable(laserscan_to_pointcloud_assembler
src/laserscan_to_ros_pointcloud.cpp
Expand All @@ -94,35 +97,47 @@ add_executable(laserscan_to_pointcloud_assembler
)


#==================
# dependencies
#==================
#===============
# dependencies =
#===============

add_dependencies(tf_rosmsg_eigen_conversions
add_dependencies(polar_to_cartesian_matrix_cache
${catkin_EXPORTED_TARGETS}
)

add_dependencies(tf_collector
add_dependencies(tf_rosmsg_eigen_conversions
${catkin_EXPORTED_TARGETS}
)

add_dependencies(laserscan_to_pointcloud
add_dependencies(tf_collector
tf_rosmsg_eigen_conversions
${catkin_EXPORTED_TARGETS}
)

add_dependencies(polar_to_cartesian_matrix_cache
add_dependencies(laserscan_to_pointcloud
tf_collector
polar_to_cartesian_matrix_cache
${catkin_EXPORTED_TARGETS}
)

add_dependencies(laserscan_to_pointcloud_assembler
${catkin_EXPORTED_TARGETS}
laserscan_to_pointcloud
${PROJECT_NAME}_gencfg
${catkin_EXPORTED_TARGETS}
)


#==================
# libraries link
#==================
#=================
# libraries link =
#=================

target_link_libraries(polar_to_cartesian_matrix_cache
${catkin_LIBRARIES}
)

target_link_libraries(tf_rosmsg_eigen_conversions
${catkin_LIBRARIES}
)

target_link_libraries(tf_collector
tf_rosmsg_eigen_conversions
Expand All @@ -136,11 +151,55 @@ target_link_libraries(laserscan_to_pointcloud
)


#==================
# executables link
#==================
#===================
# executables link =
#===================

target_link_libraries(laserscan_to_pointcloud_assembler
laserscan_to_pointcloud
${catkin_LIBRARIES}
)



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

#============================
# Libraries and executables =
#============================

install(
TARGETS
polar_to_cartesian_matrix_cache
tf_rosmsg_eigen_conversions
tf_collector
laserscan_to_pointcloud
laserscan_to_pointcloud_assembler
ARCHIVE DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
LIBRARY DESTINATION ${CATKIN_PACKAGE_LIB_DESTINATION}
RUNTIME DESTINATION ${CATKIN_PACKAGE_BIN_DESTINATION}
)


#================
# Header files =
#================

install(
DIRECTORY
include/${PROJECT_NAME}/
DESTINATION ${CATKIN_PACKAGE_INCLUDE_DESTINATION}
)


#===============
# Launch files =
#===============

install(
DIRECTORY
launch/
DESTINATION ${CATKIN_PACKAGE_SHARE_DESTINATION}/launch
)
4 changes: 2 additions & 2 deletions package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@
<author email="carloscosta.cmcc@gmail.com">Carlos Miguel Correia da Costa</author>

<buildtool_depend>catkin</buildtool_depend>
<depend>libboost-all-dev</depend>
<depend>libeigen3-dev</depend>
<depend>boost</depend>
<depend>dynamic_reconfigure</depend>
<depend>eigen</depend>
<depend>geometry_msgs</depend>
<depend>nav_msgs</depend>
<depend>rosconsole</depend>
Expand Down

0 comments on commit 39a0960

Please sign in to comment.