Skip to content

Commit

Permalink
Use Boost::python3 if Boost < 1.67 (#422)
Browse files Browse the repository at this point in the history
Signed-off-by: Shane Loretz <sloretz@openrobotics.org>
  • Loading branch information
sloretz authored Jan 24, 2022
1 parent e1df7ee commit f54a269
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions cv_bridge/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,13 @@ else()
# Resolution for newer versions:
# https://gitlab.kitware.com/cmake/cmake/issues/16391
set(_Boost_PYTHON3_HEADERS "boost/python.hpp")
find_package(Boost REQUIRED COMPONENTS python3)
set(boost_python_target "Boost::python3")
else()
find_package(Python3 REQUIRED COMPONENTS Development NumPy)
find_package(Boost REQUIRED COMPONENTS python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
set(boost_python_target "Boost::python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
endif()
find_package(Python3 REQUIRED COMPONENTS Development NumPy)
find_package(Boost REQUIRED COMPONENTS python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR})
set(boost_python_target "Boost::python${Python3_VERSION_MAJOR}${Python3_VERSION_MINOR}")
endif()

find_package(sensor_msgs REQUIRED)
Expand Down

0 comments on commit f54a269

Please sign in to comment.