AcademySoftwareFoundation / openexr

The OpenEXR project provides the specification and reference implementation of the EXR file format, the professional-grade image storage format of the motion picture industry.
http://www.openexr.com/
BSD 3-Clause "New" or "Revised" License
1.6k stars 606 forks source link

Replace deprecated FindPythonLibs in CMakeLists.txt #381

Closed jfpanisset closed 4 years ago

jfpanisset commented 5 years ago

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.

meshula commented 5 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.

lgritz commented 5 years ago

I wish VFXPlatform or ASWF would pin down a minimum CMake version that we can all count on.

jfpanisset commented 5 years ago

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.

cary-ilm commented 5 years ago

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.

meshula commented 5 years ago

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?

kdt3rd commented 4 years ago

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.