-
Notifications
You must be signed in to change notification settings - Fork 153
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
cmake: Add install rules and option to use submodule dependencies
Package ecosystems that know how to install CMake projects can now package nanobind for distribution without using submodule'd dependencies. nanobind does not install any compiled library artifacts. Instead, all necessary source files and supporting CMake files are installed to build nanobind within another CMake project. A CMake user can now adjust the CMake option `NB_USE_SUBMODULE_DEPS` to choose whether nanobind will use and/or install the submodule'd external dependencies. This is `ON` by default, allowing nanobind's CMake logic to continue operating as it did previously. Another CMake option was introduced, `NB_CREATE_INSTALL_RULES`, to allow users to choose whether to enable or disable the installation rules. Notably, if nanobind is added to a CMake project with `add_subdirectory`, the installation rules are disabled, because installing source files probably isn't the expected result of the parent project(s). Install-rule generation still respects the standard CMake `CMAKE_SKIP_INSTALL_RULES` variable.
- Loading branch information
Showing
2 changed files
with
63 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters