[CMake] linking to arbitrary libraries in linux.

Christopher Harvey arbuckle911 at gmail.com
Wed Feb 27 19:13:55 EST 2008


Hi,
Before I ask my question I want to clarify what I mean by an "arbitrary
library". There are libraries that are registered in the system and you
can link to them like so:
target_link_library(targetName GL SDL pq)
and they get sent to the linker int the form:
-lGL -lSDL -lpq
that fine, but I have a file in the form libName.a and I compiled it
from source and it's not in the /usr/lib directory. It's just sitting in
my project directory. how can I tell cmake not to turn
target_link_libraries(targetName libName.a) into -lName, but keep the
original so the linker can find it?
Thanks.


More information about the CMake mailing list