jrl-umi3218 / jrl-cmakemodules

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

Use the modern unified CMake FindPython module #708

Open ManifoldFR opened 3 months ago

ManifoldFR commented 3 months ago

This would be this module, which looks for Python version 3 by default, otherwise version 2.

It provides targets which are namespaced as Python:: (e.g. Python::Module for the Development.Module component), which is the expected format for some modern libraries such as nanobind (if the targets are not found, it even does a find_package(Python ...) call, which is the FindPython module), as I discussed with @nim65s

I think a copy of that module is already available in this directory?

nim65s commented 3 months ago

FindPython was added CMake 3.12, and unfortunately we are still keeping compatibility with 3.10.

CMake 3.10 is the version provided by 18.04. I think we should be able to drop 18.04 support to bump to CMake 3.16, and get this FindPython module without the need for using a local copy soon.

ManifoldFR commented 3 months ago

Until we drop 18.04, we could still use our local copy, though, right?