Thread: CMAKE - Link against libraries
hi all,
new cmake , somehow lost...
have sub-project, makefile is:
i try integrate bigger cmake-based project. "just" want bigger project link against tartine library.code:tartine_incl = /home/me/lib_tartine/include tartine_lib = -l/home/me/lib -ltata -ltoto -ltutu all: hello hello: hello.cpp gcc -i$(tartine_incl) -o hello hello.cpp $(tartine_lib)
did:
when compiling, include paths working, got "undefined reference ...", proves link did not work...code:set(tartine "/home/me/lib_tartine") include_directories(${tartine}/include) link_directories(${tartine}/lib) target_link_libraries( #a bunch of preexisting stuffs ${tartine}/lib)
help,
m.
i'm not cmake user, seem me missing specification following libraries:this may cause of "undefined references" linker reporting.code:-ltata -ltoto -ltutu
p.s. regular makefile incorrect; tartine paths differ, , should use 'g++', not 'gcc'.
Forum The Ubuntu Forum Community Ubuntu Specialised Support Development & Programming Programming Talk CMAKE - Link against libraries
Ubuntu
Comments
Post a Comment