From d8fbd463a0458727bd2c9f29e75600aadc89ac58 Mon Sep 17 00:00:00 2001 From: Sergei Golubchik Date: Thu, 17 Sep 2020 16:04:21 +0200 Subject: don't use deprecated _LIB_DEPENDS. CMP0073 --- cmake/libutils.cmake | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/cmake/libutils.cmake b/cmake/libutils.cmake index 92a5b9f564d..37f9cf196af 100644 --- a/cmake/libutils.cmake +++ b/cmake/libutils.cmake @@ -323,11 +323,14 @@ MACRO(MERGE_LIBRARIES) ENDMACRO() FUNCTION(GET_DEPENDEND_OS_LIBS target result) - FOREACH(lib ${${target}_LIB_DEPENDS}) - IF(NOT TARGET ${lib}) - SET(ret ${ret} ${lib}) - ENDIF() - ENDFOREACH() + GET_TARGET_PROPERTY(DEPS ${target} LINK_LIBRARIES) + IF(DEPS) + FOREACH(lib ${DEPS}) + IF(NOT TARGET ${lib}) + SET(ret ${ret} ${lib}) + ENDIF() + ENDFOREACH() + ENDIF() SET(${result} ${ret} PARENT_SCOPE) ENDFUNCTION() -- cgit v1.2.1