jrl-umi3218 / jrl-cmakemodules

CMake utility toolbox
https://jrl-cmakemodules.readthedocs.io/en/master/
Other
57 stars 45 forks source link

PYTHON_EXPORT_DEPENDENCY #523

Closed nim65s closed 2 years ago

nim65s commented 2 years ago

Hi,

FINDPYTHON() currently only use find_package(). This PR deals with the case where we need ADD_PROJECT_DEPENDENCY() instead, by adding a PYTHON_EXPORT_DEPENDENCY setting.

This also export:

wxmerkt commented 2 years ago

Can we get this merged and updated/released in EigenPy please? We have downstream packages breaking :-(

Edit: This did not fix the issue. To test, create a workspace with EigenPy-devel with this PR as the cmake module. Clone the current devel head of ndcurves. Try building current-ndcurves-devel with this EigenPy

This is working. Note, to activate this, the projects with the updated CMake module + modernized CMake need to also set set(PYTHON_EXPORT_DEPENDENCY ON) before find_python(). Many thanks to @nim65s for his assistance with sorting this out :)