2009/8/31 Eike Kroemer <eike-michael.kroe...@atlas-elektronik.com>: > Hi there, > > using cmake-2.6.4-Linux-i386, I'd like to use > > set(LIBS lib1) > set(LIBS "$LIBS lib2") > [...] > set(LIBS "$LIBS libN") > > target_link_libraries(target $LIBS) > > instead of writing explicitely > > target_link_libraries(target lib1 lib2 [...] libN) > > but while cmake gives no error messages, the library dependencies are > not honored during link. > I tried to vary the usage of '"'s but to no avail. > > How to do it correctly?
Variable values shoud be retrieve with curly brace, i.e. $LIBS --> ${LIBS} 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. -- Erk Membre de l'April - « promouvoir et défendre le logiciel libre » - http://www.april.org _______________________________________________ Powered by www.kitware.com Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html Please keep messages on-topic and check the CMake FAQ at: http://www.cmake.org/Wiki/CMake_FAQ Follow this link to subscribe/unsubscribe: http://www.cmake.org/mailman/listinfo/cmake