diff --git a/source/MaterialXRender/External/OpenImageIO/FindOpenImageIO.cmake b/source/MaterialXRender/External/OpenImageIO/FindOpenImageIO.cmake index 4fab4f9814..6c1b1682d6 100644 --- a/source/MaterialXRender/External/OpenImageIO/FindOpenImageIO.cmake +++ b/source/MaterialXRender/External/OpenImageIO/FindOpenImageIO.cmake @@ -45,6 +45,13 @@ find_library ( OPENIMAGEIO_LIBRARY HINTS ${OPENIMAGEIO_ROOT_DIR}/lib PATH_SUFFIXES lib64 lib PATHS "${OPENIMAGEIO_ROOT_DIR}/lib" ) + +find_library ( OPENIMAGEIO_UTIL_LIBRARY + NAMES OpenImageIO_Util${OIIO_LIBNAME_SUFFIX} + HINTS ${OPENIMAGEIO_ROOT_DIR}/lib + PATH_SUFFIXES lib64 lib + PATHS "${OPENIMAGEIO_ROOT_DIR}/lib" ) + find_path ( OPENIMAGEIO_INCLUDE_DIR NAMES OpenImageIO/imageio.h HINTS ${OPENIMAGEIO_ROOT_DIR}/include @@ -66,7 +73,7 @@ if (EXISTS "${OIIO_VERSION_HEADER}") set (OPENIMAGEIO_VERSION "${OPENIMAGEIO_VERSION_MAJOR}.${OPENIMAGEIO_VERSION_MINOR}.${OPENIMAGEIO_VERSION_PATCH}") endif () -set ( OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY}) +set ( OPENIMAGEIO_LIBRARIES ${OPENIMAGEIO_LIBRARY} ${OPENIMAGEIO_UTIL_LIBRARY}) get_filename_component (OPENIMAGEIO_LIBRARY_DIRS "${OPENIMAGEIO_LIBRARY}" DIRECTORY CACHE) if (NOT OpenImageIO_FIND_QUIETLY)