Don't try to remove from an empty list.

This commit is contained in:
Jonathan Perkin 2010-08-09 15:41:15 +01:00
parent 9ae1b1d157
commit aeea7b6d25

View File

@ -253,6 +253,7 @@ ENDIF()
# Extract dependencies using CMake's internal ${target}_LIB_DEPENDS variable
# returned string in ${var} is can be passed to linker's command line
MACRO(EXTRACT_LINK_LIBRARIES target var)
IF(${target}_LIB_DEPENDS)
LIST(REMOVE_ITEM ${target}_LIB_DEPENDS "")
LIST(REMOVE_DUPLICATES ${target}_LIB_DEPENDS)
FOREACH(lib ${${target}_LIB_DEPENDS})
@ -271,6 +272,7 @@ MACRO(EXTRACT_LINK_LIBRARIES target var)
ENDIF()
ENDIF()
ENDFOREACH()
ENDIF()
IF(MSVC)
STRING(REPLACE "-l" "" ${var} "${${var}}")
ENDIF()