Brandon J. Van Every wrote:
Jorge Rodriguez wrote:



Also, what if I turned around and did this:

ADD_EXECUTABLE(bar ${BarSources})
TARGET_LINK_LIBRARIES(bar foo)

Would it link against foo or foos?

foo. It goes by the *target* name, which must be unique in CMake. Not the library name.


Although, if you hadn't actually defined a target named "foo", it will just do a straight -lfoo . For instance I have to do -lm this way on Unix. I write TARGET_LINK_LIBRARIES(bar m).


Cheers,
Brandon Van Every

_______________________________________________
CMake mailing list
[email protected]
http://www.cmake.org/mailman/listinfo/cmake

Reply via email to