Skip to content

Commit

Permalink
pymrpt: allow build with find_package'd mrpt libs
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Jul 27, 2024
1 parent 1e171e5 commit cf173a1
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion python/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,23 @@ else()
target_link_options(pymrpt PRIVATE -flto=auto)
endif()

# enable separate build of pymrpt for ros packages:
if(NOT TARGET mrpt::apps)
find_package(mrpt-apps REQUIRED)
endif()
if(NOT TARGET mrpt::nav)
find_package(mrpt-nav REQUIRED)
endif()
if(NOT TARGET mrpt::slam)
find_package(mrpt-slam REQUIRED)
endif()
if(NOT TARGET mrpt::gui)
find_package(mrpt-gui REQUIRED)
endif()

# Link:
target_link_libraries(pymrpt PUBLIC
mrpt::apps
mrpt::serialization
mrpt::slam
mrpt::gui
mrpt::nav
Expand Down

0 comments on commit cf173a1

Please sign in to comment.