Skip to content

Commit

Permalink
Fix cmake such that Boost::filesystem is exported properly (moveit#206)
Browse files Browse the repository at this point in the history
Co-authored-by: Jordan Lack <jlack@houstonmechatronics.com>
  • Loading branch information
JafarAbdi and Jordan Lack committed Dec 8, 2021
1 parent 8b82199 commit 5fa5084
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 2 deletions.
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ find_package(eigen3_cmake_module REQUIRED)
find_package(Eigen3 REQUIRED)

find_package(ament_cmake REQUIRED)
find_package(Boost REQUIRED filesystem)
include(ConfigExtras)
find_package(console_bridge REQUIRED)
find_package(console_bridge_vendor REQUIRED)
find_package(eigen_stl_containers REQUIRED)
Expand Down Expand Up @@ -126,4 +126,4 @@ install(DIRECTORY include/ DESTINATION include)
ament_export_targets(export_${PROJECT_NAME} HAS_LIBRARY_TARGET)
ament_export_dependencies(${THIS_PACKAGE_EXPORT_DEPENDS})

ament_package()
ament_package(CONFIG_EXTRAS "cmake/ConfigExtras.cmake")
31 changes: 31 additions & 0 deletions cmake/ConfigExtras.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Copyright 2021 Open Robotics
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# * Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# * Neither the name of the Open Robotics nor the names of its
# contributors may be used to endorse or promote products derived from
# this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.

# Put find_package calls to packages with components so
# dependent packages can link against component libraries
find_package(Boost REQUIRED COMPONENTS filesystem)

0 comments on commit 5fa5084

Please sign in to comment.