Commit 953bd682 authored by Jonathan Perkin's avatar Jonathan Perkin

Don't try to remove from an empty list.

parent d41683cc
......@@ -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()
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment