Use PkgConfig to find OpenEXR. Otherwise, the code fails
when OpenEXR/OpenEXRConfig.h is a multilib wrapper.
Changes taken from openimageio-1.8.17.

--- openimageio-1.7.17/src/cmake/modules/FindOpenEXR.cmake
+++ openimageio-1.7.17/src/cmake/modules/FindOpenEXR.cmake
@@ -27,6 +27,13 @@
     set (ILMBASE_PTHREADS ${CMAKE_THREAD_LIBS_INIT})
 endif ()
 
+# Attempt to find OpenEXR with pkgconfig
+find_package(PkgConfig)
+if (PKG_CONFIG_FOUND)
+    pkg_check_modules(_ILMBASE QUIET IlmBase)
+    pkg_check_modules(_OPENEXR QUIET OpenEXR>=2.0.0)
+endif (PKG_CONFIG_FOUND)
+
 # List of likely places to find the headers -- note priority override of
 # OPENEXR_CUSTOM_INCLUDE_DIR and ${OPENEXR_HOME}/include.
 # ILMBASE is needed in case ilmbase an openexr are installed in separate
@@ -35,6 +42,8 @@
     ${OPENEXR_CUSTOM_INCLUDE_DIR}
     ${OPENEXR_HOME}/include
     ${ILMBASE_HOME}/include
+    ${_ILMBASE_INCLUDEDIR}
+    ${_OPENEXR_INCLUDEDIR}
     /usr/local/include
     /usr/include
     /usr/include/${CMAKE_LIBRARY_ARCHITECTURE}
@@ -53,7 +62,11 @@
 find_path (OPENEXR_INCLUDE_PATH OpenEXR/OpenEXRConfig.h)
 
 # Try to figure out version number
-if (EXISTS "${OPENEXR_INCLUDE_PATH}/OpenEXR/ImfMultiPartInputFile.h")
+if (DEFINED _OPENEXR_VERSION AND NOT "${_OPENEXR_VERSION}" STREQUAL "")
+    set (OPENEXR_VERSION "${_OPENEXR_VERSION}")
+    string (REGEX REPLACE "([0-9]+)\\.[0-9]+" "\\1" OPENEXR_VERSION_MAJOR "${_OPENEXR_VERSION}")
+    string (REGEX REPLACE "[0-9]+\\.([0-9]+)" "\\1" OPENEXR_VERSION_MINOR "${_OPENEXR_VERSION}")
+elseif (EXISTS "${OPENEXR_INCLUDE_PATH}/OpenEXR/ImfMultiPartInputFile.h")
     # Must be at least 2.0
     file(STRINGS "${OPENEXR_INCLUDE_PATH}/OpenEXR/OpenEXRConfig.h" TMP REGEX "^#define OPENEXR_VERSION_STRING .*$")
     string (REGEX MATCHALL "[0-9]+[.0-9]+" OPENEXR_VERSION ${TMP})
@@ -90,6 +103,8 @@
     ${GENERIC_LIBRARY_PATHS}
     ${OPENEXR_INCLUDE_PATH}/../lib
     ${ILMBASE_INCLUDE_PATH}/../lib
+    ${_ILMBASE_LIBDIR}
+    ${_OPENEXR_LIBDIR}
     /usr/local/lib
     /usr/local/lib/${CMAKE_LIBRARY_ARCHITECTURE}
     /usr/lib
