[CMake] Library dependencies

Tyler Roscoe tyler at cryptio.net
Fri Jun 26 01:28:32 EDT 2009


On Thu, Jun 25, 2009 at 09:54:11PM -0500, Nathan Paul wrote:
> When I tell MessageTest to link to Messages (using target_link_libraries and
> specifying the Messages library), the Google Protocol Buffer library is
> added as a dependency. This is undesired, since the library is already
> linked statically to the Messages library, and is not directly needed by the

It's past my bedtime but I think you want to play with
LINK_INTERFACE_LIBRARIES:

http://www.cmake.org/cmake/help/cmake2.6docs.html#prop_tgt:LINK_INTERFACE_LIBRARIES

> MessageTest executable. Also, the .lib file generated by the build does not
> get placed into Build/bin, which is what I would like. What is the best way
> to do this?

Look at ARCHIVE_OUTPUT_DIRECTORY.

tyler


More information about the CMake mailing list