Skip to content
Snippets Groups Projects
Commit 5b03518c authored by Martin Christoph Hierholzer's avatar Martin Christoph Hierholzer
Browse files

fix for depending Makefile projects: do not add -l option to full-path library names

parent 895db14f
No related branches found
No related tags found
No related merge requests found
......@@ -32,7 +32,11 @@ endforeach()
string(REPLACE " " ";" LIST ${${PROJECT_NAME}_LIBRARIES})
foreach(LIBRARY ${LIST})
set(${PROJECT_NAME}_LINKER_FLAGS_MAKEFILE "${${PROJECT_NAME}_LINKER_FLAGS_MAKEFILE} -l${LIBRARY}")
if(LIBRARY MATCHES "/") # library name contains slashes: link against the a file path name
set(${PROJECT_NAME}_LINKER_FLAGS_MAKEFILE "${${PROJECT_NAME}_LINKER_FLAGS_MAKEFILE} ${LIBRARY}")
else() # library name does not contain slashes: link against library with -l option
set(${PROJECT_NAME}_LINKER_FLAGS_MAKEFILE "${${PROJECT_NAME}_LINKER_FLAGS_MAKEFILE} -l${LIBRARY}")
endif()
endforeach()
# we have nested @-statements, so we have to parse twice:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment