[CMake] help with variable usage in target_link_libraries

Eike Kroemer eike-michael.kroemer at atlas-elektronik.com
Mon Aug 31 02:51:00 EDT 2009


Hi Eric,

> Variable values shoud be retrieve with curly brace, i.e.
> 
> $LIBS --> ${LIBS}
Yick, I had done that but not cited it correctly in my mail, sorry about
that.

> Then when you have a list of something you usually use LIST(APPEND
> 
> LIST(APPEND LIBS "libN")
> 
> even if
> 
> SET(LIBS "${LIBS} libN") should work as well.

list(APPEND ...) does the trick (while set doesn't), thanks!


More information about the CMake mailing list