[CMake] object-libraries and compile-dependencies to other target

Patrick Boettcher patrick.boettcher at posteo.de
Wed Jul 20 08:29:24 EDT 2016


Hi list,

I'm using an object-library to generate a list of .o-files instead of
archives which I use to link into several executable.

Even though it is only an object-library it has compile-dependencies to
other targets - this includes include-paths, compile-definitions and
compile-features. 

I can't (or I don't know how) use target_link_libraries() with my
object-library. 

What can I do to make it work? I'm exploring generator-expressions, but
this seems redundant as I need to list all dependencies again.

best regards,
--
Patrick.



More information about the CMake mailing list