[CMake] Build/Link with static libs
Christian Lang
christian.lang at uni-bielefeld.de
Tue Apr 18 14:54:32 EDT 2006
Hi,
I want to link a target (executable) against some static (not installed)
libs (e.g. "./foo.a"). How can I do this? "TARGET_LINK_LIBRARIES" does
not work. I cannot use "CMAKE_EXE_LINKER_FLAGS" either, because the
flags appear before the object files, leading to link failure for
dependency reasons. (The static libs have to appear after the last
object file.)
Furthermore I want to build some static "noinst" libs in some
subdirectories (each with its own CMakeLists.txt) and link them into an
executable in the toplevel-directory. This executable does not require
any additional source files, it shall be build from this libs only. What
is an appropriate way to achieve this?
Thanks,
Christian
*||*
More information about the CMake
mailing list