From e2bc80b46f0e92783bae294a6fa8740f07390ece Mon Sep 17 00:00:00 2001 From: Olivier Prat Date: Mon, 1 Apr 2019 15:07:29 +0200 Subject: [PATCH] Fixed for debug --- cmake/macros/TargetOpenEXR.cmake | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/cmake/macros/TargetOpenEXR.cmake b/cmake/macros/TargetOpenEXR.cmake index 6d01ef9bda..8d61f216e7 100644 --- a/cmake/macros/TargetOpenEXR.cmake +++ b/cmake/macros/TargetOpenEXR.cmake @@ -49,7 +49,7 @@ macro(TARGET_OPENEXR) #mark_as_advanced(OPENEXR_${OPENEXR_LIB}_LIBRARY) if(OPENEXR_${OPENEXR_LIB}_LIBRARY_RELEASE) - list(APPEND OPENEXR_LIBRARIES ${OPENEXR_${OPENEXR_LIB}_LIBRARY_RELEASE}) + list(APPEND OPENEXR_LIBRARY_RELEASE ${OPENEXR_${OPENEXR_LIB}_LIBRARY_RELEASE}) endif() # OpenEXR libraries may be suffixed with the version number, so we search @@ -63,10 +63,12 @@ macro(TARGET_OPENEXR) ) #mark_as_advanced(OPENEXR_${OPENEXR_LIB}_DEBUG_LIBRARY) - select_library_configurations(OPENEXR_${OPENEXR_LIB}) - + if(OPENEXR_${OPENEXR_LIB}_LIBRARY_DEBUG) + list(APPEND OPENEXR_LIBRARY_DEBUG ${OPENEXR_${OPENEXR_LIB}_LIBRARY_DEBUG}) + endif() endforeach(OPENEXR_LIB) - target_link_libraries(${TARGET_NAME} ${OPENEXR_LIBRARIES}) + select_library_configurations(OPENEXR) + target_link_libraries(${TARGET_NAME} ${OPENEXR_LIBRARY}) endif() endmacro()