[CMake] Link directories order

Renaud Detry renaudjdetry at airpost.net
Tue Nov 6 11:22:55 EST 2007


> Did you build it using ADD_LIBRARY?
> If yes:
> PROJECT(HELLO)
> ADD_LIBRARY(Hello foo.c)
> ADD_EXECUTABLE(HelloBin bar.c)
> TARGET_LINK_LIBRARIES(HelloBin Hello)

This is exactly what I have.

> ADD_LIBRARY defines the TARGET "Hello" in the above lines. That  
> should link to the local libHello even if you have another version  
> in the system.

This is what I thought, too. Unfortunately it doesn't.

Renaud.





More information about the CMake mailing list