Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit fa729bf

Browse files
committed
Update matplotlib_cppConfig.cmake.in
1 parent fbedd3b commit fa729bf

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed

cmake/matplotlib_cppConfig.cmake.in

+6-3
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,11 @@ if(NOT DEFINED matplotlib_cpp_FOUND)
1212
)
1313

1414
set(matplotlib_LIBS ${PYTHON_LIBRARIES})
15-
list(GET matplotlib_LIBS 0 2 3 REMOVE_STR)
16-
remove(matplotlib_LIBS ${REMOVE_STR})
17-
15+
16+
list(LENGTH matplotlib_LIBS Len)
17+
if(${Len}>1)
18+
list(GET matplotlib_LIBS 0 2 3 REMOVE_STR)
19+
remove(matplotlib_LIBS ${REMOVE_STR})
20+
endif()
1821
message("--- [matplotlib_cpp]: Found! Already include required directories! Please link matplotlib_LIBS with /MT options.")
1922
endif()

0 commit comments

Comments
 (0)