Skip to content

Commit

Permalink
cleaner importing of dependencies
Browse files Browse the repository at this point in the history
  • Loading branch information
berndpfrommer committed Mar 11, 2024
1 parent 6792bbb commit db6b407
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
25 changes: 7 additions & 18 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -33,20 +33,9 @@ foreach(pkg ${ament_dependencies})
find_package(${pkg} REQUIRED)
endforeach()

#
# find libav because the dependencies exported by ffmpeg_image_transport are
# screwed up.
#
find_package(PkgConfig REQUIRED)
pkg_check_modules(LIBAV IMPORTED_TARGET
libavdevice
libavfilter
libavformat
libavcodec
libswresample
libswscale
libavutil
)
if(${cv_bridge_VERSION} GREATER "3.3.0")
add_definitions(-DUSE_CV_BRIDGE_HPP)
endif()


#
Expand Down Expand Up @@ -76,18 +65,18 @@ if(BUILD_TESTING)
find_package(ament_cmake_cppcheck REQUIRED)
find_package(ament_cmake_cpplint REQUIRED)
find_package(ament_cmake_clang_format REQUIRED)
# find_package(ament_cmake_flake8 REQUIRED)
find_package(ament_cmake_flake8 REQUIRED)
find_package(ament_cmake_lint_cmake REQUIRED)
# find_package(ament_cmake_pep257 REQUIRED)
find_package(ament_cmake_pep257 REQUIRED)
find_package(ament_cmake_xmllint REQUIRED)

ament_copyright()
ament_cppcheck(LANGUAGE c++)
ament_cpplint(FILTERS "-build/include,-runtime/indentation_namespace")
ament_clang_format(CONFIG_FILE .clang-format)
# ament_flake8()
ament_flake8()
ament_lint_cmake()
# ament_pep257()
ament_pep257()
ament_xmllint()
endif()

Expand Down
4 changes: 4 additions & 0 deletions src/bag_to_frames.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,11 @@
#include <unistd.h>

#include <chrono>
#ifdef USE_CV_BRIDGE_HPP
#include <cv_bridge/cv_bridge.hpp>
#else
#include <cv_bridge/cv_bridge.h>
#endif
#include <ffmpeg_image_transport/ffmpeg_decoder.hpp>
#include <ffmpeg_image_transport_msgs/msg/ffmpeg_packet.hpp>
#include <ffmpeg_image_transport_tools/bag_processor.hpp>
Expand Down

0 comments on commit db6b407

Please sign in to comment.