Commit aeea7b6d authored by Jonathan Perkin's avatar Jonathan Perkin

Don't try to remove from an empty list.

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