delvewheel
delvewheel copied to clipboard
How to search for libraries from subprojects
I am curious if there is a best practice for bundling libraries come from subpackages of the build system. In my particular case, I am using CMake, but I believe this same issue would apply to meson as well.
To illustrate, let's assume I have a CMake dependency that I declare as:
include(FetchContent)
FetchContent_Declare(another_proj ...)
FetchContext_MakeAvailable(another_proj)
CMake will build and place the artifacts for the other project in <build_dir>/another_proj-build/
, which is not something delvewheel will be able to search by default. For local builds, you may be able to influence the search path to have it find this directory, but on a tool like cibuildwheel I am under the impression that the only way to get this library into your project would be to install
it into the wheel. But then when cibuildwheel tries to repair the wheel you end up with library cannot be found
, requiring you to add --ignore-in-wheel
and not get any of the mangling needed for the subproject library.
Is there something I am overlooking as to how this situation works? If not, is there a suggested approach on how to handle libraries from subprojects?