Add a CMake option to use system-provided pybind11#6516
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds a CMake option NCNN_SYSTEM_PYBIND11 to enable the use of system-provided pybind11 packages instead of the bundled submodule version, allowing users to leverage pybind11 from their Linux distribution's official repositories.
Changes:
- Added
NCNN_SYSTEM_PYBIND11CMake option inpython/CMakeLists.txt - Implemented conditional logic to use system pybind11 via
find_package()when enabled, otherwise fall back to bundled version - Added documentation in
python/README.mdexplaining how to use the new option
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| python/README.md | Added documentation section explaining the new NCNN_SYSTEM_PYBIND11 option with a usage example |
| python/CMakeLists.txt | Added option definition and conditional logic to choose between system and bundled pybind11 |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This option enables the use of the pybind11 package available in the official repositories of Linux distributions.
|
@nihui IMO, the suggestion from Copilot, which uses the I have just pushed a new commit to include the latest changes :) |
|
Thanks for your contribution ! |
This option enables the use of the pybind11 package available in the official repositories of Linux distributions.