AcademySoftwareFoundation / openvdb

OpenVDB - Sparse volume data structure and tools
http://www.openvdb.org/
Apache License 2.0
2.71k stars 660 forks source link

[BUG] Remove FindOpenEXR.cmake #1740

Open mwestphal opened 11 months ago

mwestphal commented 11 months ago

The provided FindOpenEXR.cmake (and all other Find*.cmake really) is overriding OpenEXRConfig.cmake, which means that some dependency of OpenEXR may be missing.

In my specific case, OpenEXR is built with Imath, which FindOpenEXR.cmake is not providing, which result in

[ 21%] Building CXX object library/VTKExtensions/Readers/CMakeFiles/VTKExtensionsReaders.dir/vtkF3DEXRReader.cxx.o
In file included from /usr/include/OpenEXR/ImfRgbaFile.h:21,
                 from /home/glow/dev/f3d/f3d/src/library/VTKExtensions/Readers/vtkF3DEXRReader.cxx:11:
/usr/include/OpenEXR/ImfFrameBuffer.h:21:10: fatal error: ImathBox.h: No such file or directory
   21 | #include <ImathBox.h>
      |          ^~~~~~~~~~~~
compilation terminated.

Please let each library find themselves.

Removing FindOpenEXR.cmake seems to be resolving the issue for the general case but then I have strange unrelated macOS issues, so some care is needed here.