Brad King wrote:
> On 9/26/2011 7:28 AM, Stephen Kelly wrote:
>> In KDE we set the LINK_INTERFACE_LIBRARIES to empty in a wrapper around
>> add_library.
> [snip]
>> set(CMAKE_SET_LINK_INTERFACE_EMPTY ON)
>>
>> cause the LINK_INTERFACE to be empty for all shared library targets be
>> accepted into CMake?
>
> Sure. I think the simplest interface is to define a variable whose value
> is used as the property default for LINK_INTERFACE_LIBRARIES:
>
> set(CMAKE_LINK_INTERFACE_LIBRARIES "")
>
> Look in cmTarget.cxx for the method cmTarget::SetMakefile. There are a
> bunch of calls to "SetPropertyDefault". Just add one like
>
> this->SetPropertyDefault("LINK_INTERFACE_LIBRARIES", 0);
>
> This tells CMake to use the value of the variable
>
> CMAKE_LINK_INTERFACE_LIBRARIES
>
> as the default LINK_INTERFACE_LIBRARIES when the target is created.
> The ",0" argument means that there is no default if the variable is
> not set.
>
> Then add appropriate documentation for the variable in cmDocumentVariables
> and add a sentence to the original property documentation about how the
> default is defined.
>
Sounds good. Thanks for the pointers (including what is presumably a null
pointer :)).
--
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
Please keep messages on-topic and check the CMake FAQ at:
http://www.cmake.org/Wiki/CMake_FAQ
Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers