[CMake] Generated library location

Rolf Eike Beer eike at sf-mail.de
Sun Mar 4 13:50:50 EST 2012


Am Sonntag, 4. März 2012, 11:28:47 schrieb Kevin Nathan:
> I have inherited maintenance (and updating) on a program that was
> spread over three different source root trees and I have incorporated
> them into one source tree. Since I am fairly new to CMake (and really
> loving it compared to autotools), I am probably missing something
> obvious, but here is my problem: doing an out-of-source build, my
> 'old-common' library (which will eventually be phased out) ends up
> in ./build/old-common but the source for prog2 and prog3 all look for
> it in ./old-common. Is there a command I can use to cause CMake to
> actually build the lib in ./old-common (or move it there) or do I need
> to write a command to copy it after generation? Or should I just use an
> in-source build (which I would prefer not to do)? Or is there another
> obvious solution which I cannot see? I have been looking through this
> mailing list and combing through the CMake docs but I just cannot see
> an easy solution...

target_link_libraries(prog2 old-common)
target_link_libraries(prog3 old-common)

Eike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: This is a digitally signed message part.
URL: <http://www.cmake.org/pipermail/cmake/attachments/20120304/1f4ff602/attachment.pgp>


More information about the CMake mailing list