Closed jfpanisset closed 4 years ago
Sounds like a good suggestion. FindPython isn't available prior to CMake 3.12. Linux distros still commonly in use bundle old versions of cmake. Ubuntu 16.04 as an example bundles 3.5.1. Some logic would need to be added that detects cmake version and calls the appropriate find function. PR's welcome.
I wish VFXPlatform or ASWF would pin down a minimum CMake version that we can all count on.
I agree that a minimum CMake baseline would make sense, definitely in the context of ASWF. I'll put together a proposed PR with conditional CMake code.
Did anything come of this?
OpenEXR currently supports installation via the gnu autotools as well as CMake, so one option would be to choose a more recent version of CMake, and any distros that can't deal with that could install via autotools.
That would work for linux, but not windows; autotools is available for mac, but it is not a convenient thing to set up. I'd be interested in some conditional CMake as proposed by @jfpanisset - I don't think I see a PR for it though?
This has been implemented. We are using cmake 3.12 which has built-in support for finding both python2 and python3 at the same time, as commented, and users will have to update their versions of cmake.
The top level CMakeLists.txt calls find_package(PythonLibs...) which according to https://cmake.org/cmake/help/latest/module/FindPythonLibs.html is deprecated as of CMake 3.12, to be replaced by FindPython2 / FindPython3 / FindPython.