Skip to content

Conversation

@valgur
Copy link

@valgur valgur commented Jun 28, 2024

Hi! Thank you for creating and sharing this fantastic piece of software. 🙂

This PR proposes a switch to Conan for managing all of the third-party dependencies. It should make the library setup and version management a bit easier.

I have provided a Conan CMake wrapper that automatically takes care of making the dependencies available to CMake, provided that Conan has been installed (pip install conan). If more control is needed over the deps, it can be done in two steps instead:

conan profile detect
conan install . --build missing
cmake --preset conan-release
cmake --build --preset conan-release

or

conan profile detect
conan install . --build missing -s build_type Release
cmake . -B build/Release -DCMAKE_BUILD_TYPE=Release -DCMAKE_TOOLCHAIN_FILE=build/Release/generators/conan_toolchain.cmake
cmake --build build/Release

or simply

conan profile detect
conan build . --build missing

Also:

  • I made the Qt5 Conan dependency optional since it's slow to build and a bit difficult to use due to plugins and font handling in the relocated package.
  • Made Vulkan support non-optional as it's easily available from Conan now.
  • Bumped the min CMake version to 3.18 for better CUDA support.
  • Dropped the CUB dependency since CUDA 10 has been out for a while now. It's available on ConanCenter as well, if needed.
  • Fixed some minor compilation issues in the source code, which were mostly caused by bumping the dependency versions. The only one I'm not too sure about is https://github.com/valgur/camera_calibration/blob/b0a3076a427b97fc92a3e2bc925dc508ff55be25/libvis/src/libvis/render_window_qt_vulkan.cc#L731-L743, which was needed due to missing QtThread in newer Qt5 versions.
  • The CMake and Conan integration is only loosely coupled. It can be easily disabled with -DUSE_CONAN=FALSE and -DCMAKE_TOOLCHAIN_FILE=<vcpkg-root>/scripts/buildsystems/vcpkg.cmake with vcpkg.json used instead, for example. Vcpkg support should be quite doable as well - only OpenGV is currently missing a port.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant