[CMake] more on an executable dependency on external library

Crni Gorac cgorac at gmail.com
Tue Dec 5 16:33:23 EST 2006


OK, I've tried in the meantime various arrangements with
ADD_CUSTOM_TARGET(), but seems hard to employ it to have CMake to put
following simple dependency of an executable "foo" on system library
"libbar.a" into generated Makefile:
foo: /usr/local/lib/libbar.a

There exists of course ADD_EXECUTABLE() statement for executable foo,
and there exists also TARGET_LINK_LIBRARIES() statement specifying
that "foo" should be linked with "libbar.a".  The library "libbar.a"
is a system-wide installed library, however let's say it changes
often, and it is necessary to have above dependency somehow captured
by CMake.  Any suggestion on how to accomplish this?

Thanks.


More information about the CMake mailing list