Add vcpkg support for easier dependency management #7386
+133
−11
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds native vcpkg support to Open3D, enabling easier builds with vcpkg-managed dependencies.
Note: This is Phase 1 of vcpkg support - upstream changes to Open3D's build system. Phase 2 (creating the actual vcpkg port in microsoft/vcpkg) will follow after this PR is merged.
Changes
All changes are backwards compatible - non-vcpkg builds work as before.
Roadmap for Full vcpkg Support
Note: CUDA is supported in Phase 1 - just install CUDA Toolkit separately and use
-DBUILD_CUDA_MODULE=ONType
Motivation and Context
vcpkg is a popular C++ package manager used by many developers, but Open3D has lacked native vcpkg support since 2019 (#767). Previous attempts (microsoft/vcpkg#17423) failed due to pkg-config path issues and missing CMake target compatibility.
This PR enables Open3D to build seamlessly with vcpkg-managed dependencies by:
Checklist:
python util/check_style.py --applyto apply Open3D code styleto my code.
updated accordingly.
results (e.g. screenshots or numbers) here.
Description
Changes Made
CMakeLists.txt3rdparty/find_dependencies.cmake3rdparty/stdgpu/stdgpu.cmakecpp/open3d/utility/Download.cppvcpkg.jsonTest Results
Successfully built on Ubuntu 22.04 with vcpkg:
Current Scope (Phase 1)
Dependencies from vcpkg (verified working)
assimp, curl, eigen3, fmt, glew, glfw3, jpeg, jsoncpp, msgpack, nanoflann, openssl, png, qhull, tbb, tinyobjloader, zeromq, cppzmq, minizip
Backwards Compatibility
All changes include fallbacks - non-vcpkg builds work exactly as before.
Next Steps After This PR