frameworks branch now requires CMake 2.8.6 RC 2

Stephen Kelly steveire at gmail.com
Sat Sep 17 17:53:44 UTC 2011


Alexander Neundorf wrote:

> On Sunday, September 04, 2011 10:17:31 PM Stephen Kelly wrote:
>> Stephen Kelly wrote:
>> > With these features it is possible to build individual kde frameworks
>> > standalone. I can now cmakekde in itemmodels or in tier1 (because the
>> > tier1 libraries do not have dependencies on each other).
>> > 
>> > Please review the ECMQtFramework.cmake file which makes this possible.
>> 
>> Something else I forgot to mention in my previous mail: By porting to
>> extra- cmake-modules, away from the macros that are already in kdelibs
>> (kde4_add_library) I dropped some features. We need to consider those
>> features and answer the questions:
>> 
>> * Is it still needed?
>> * Should it be in ecm?
>> * Should it be in cmake?
>> 
>> kde4_add_library handles automoc, rpath, export symbols, enable_final,
>> and it sets the LINK_INTERFACE_LIBRARIES to empty.
>> 
>> With cmake 2.8.6, that macros automoc and exports handling are obsolete.
>> I added some rpath handling to ecm in ECMQtFramework.
>> 
>> That leaves enable_final and setting LINK_INTERFACE_LIBRARIES to empty.
>> I'm
> 
> Setting LINK_INTERFACE_LIBRARIES to empty is still needed and wanted.
> By default, all libraries a target is linked agaonst are in the
> LINK_INTERFACE, which leads to unnecessary dependencies and increased load
> time.
> The alternative would be not to set it to empty, and expect our developers
> to take care of it. I think this is not realistic.
> So I'm quite sure we still want that

Ok. So should we set it even if nothing we link to should be excluded from 
the link interface? Should libraries somehow notify consumers of what they 
depend on? Is that what we need to use the Foo_LIBRARIES variable for?

I'd like if it was possible to write code like this without uncommenting:

target_link_libraries(some_executable ${itemmodels_LIBRARY}
#   ${QT_QTCORE_LIBRARIES} ${QT_QTGUI_LIBRARIES}
)

Should that instead use LIBRARIES and we rely on developers to populate the 
LIBRARIES variable correctly? Do they have to do that anyway?

If we have an ecm_add_library which does this:

macro(ecm_add_library)
  add_library(...)
  set_target_properties(itemmodels PROPERTIES LINK_INTERFACE_LIBRARIES "" )
endmacro()

Should we also encourage frameworks to do this:

ecm_add_library(itemmodels ...)
target_link_libraries(itemmodels ...)
target_link_libraries(itemmodels
  LINK_INTERFACE_LIBRARIES
  ${QT_QTCORE_LIBRARY}
  ${QT_QTGUI_LIBRARY}
)

?

Is there any disadvantage or not to that?

Steve.




More information about the Kde-buildsystem mailing list