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.
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
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.