[cmake-developers] Setting includes, defines and other usage requirements with one command
Stephen Kelly
steveire at gmail.com
Sun Jan 27 17:06:07 EST 2013
Alexander Neundorf wrote:
> Does
>
> function(target_use_stuff _target )
> target_compile_definitions(${_target} ${ARGN})
> target_include_directories(${_target} ${ARGN})
> target_link_libraries(${_target} ${ARGN})
> endfunction()
>
> actually differ from what you want to do for tll() ?
Yes. tll() takes LINK_PUBLIC and the others take PUBLIC for example.
Additionally tll() can take non-targets such as library-file names and
strings such as "-Wl,-Bsymbolic-functions -Wl,-z,relro -lgssapi_krb5 -lkrb5
-lk5crypto -lcom_err" as is used in kdelibs (from GSSAPI).
There is some clean-up to do, but it is possible to write a macro for it, as
I wrote here:
http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/5835/focus=5841
although the macro I wrote there doesn't handle things like
tll(foo LINK_PUBLIC bar LINK_PRIVATE blub)
but again that's fixable, but I don't think a macro is the right approach.
Thanks,
Steve.
More information about the cmake-developers
mailing list