diff --git a/src/lib/OpenEXRCore/CMakeLists.txt b/src/lib/OpenEXRCore/CMakeLists.txt index a3ab8ac89c..083042d3a8 100644 --- a/src/lib/OpenEXRCore/CMakeLists.txt +++ b/src/lib/OpenEXRCore/CMakeLists.txt @@ -90,7 +90,9 @@ openexr_define_library(OpenEXRCore # when building with an internal imath, this isn't generated until # install time, so need to use private header only include path (we # aren't linking to imath or anything c++) -if (TARGET Imath::ImathConfig) +if (TARGET ImathConfig) + target_link_libraries(OpenEXRCore PRIVATE ImathConfig) +elseif (TARGET Imath::ImathConfig) target_link_libraries(OpenEXRCore PRIVATE Imath::ImathConfig) else() target_include_directories(OpenEXRCore PRIVATE ${IMATH_HEADER_ONLY_INCLUDE_DIRS})