Modified build system for itemmodels

Stephen Kelly steveire at gmail.com
Sun May 6 14:04:34 UTC 2012


Alexander Neundorf wrote:
>> kf5_do_common_stuff() # TODO: Get better name
> 
> Where should this macro come from ?
> Should this be expanded from @PACKAGE_INIT@ or from an included file ?
> From an included file would be bad, this would add compatibility issues
> for the included file.

You mean if it's supplied by ecm or cmake, that different versions might do 
different things, and this depends on the version of CMake/ecm that the user 
of that config file is using?

How is that different to a macros file using ParseArguments or a Config file 
using set_package_properties from FeatureSummary, as we expect Config files 
to do?

>> It also sort of turns into a macro with a lot of API. How would I define
>> macros in my Config file or include() macros file, or do any of the other
>> powerful things that Config files allow me to do?
> 
> Slightly modified:
> 
> ecm_write_basic_config_file(${CMAKE_BINARY_DIR}/FooConfig.cmake
>                   PATH_VARS     FOO_INSTALL_DIR FOO_INCLUDE_DIR
>                   FOO_DATA_DIR
>                   OTHER_VARS    FOO_WITH_Bat FOO_WITH_Blub FOO_LIBRARIES
>                   FILES_TO_INCLUDE 
>                   FooLibraryTargets.cmake;FooMacros.cmake
>                   EXTRA_CONFIG_STRING "#something more for the Config
>                   file" )
> 
> You can put the macros into FooMacros.cmake, which would be included by
> the Config.cmake file, or you could put them into EXTRA_CONFIG_STRING.

The list of things that would have to go into such a macro would keep 
growing and growing.

It would need to be told what its (public) dependencies are, because they 
should be found and their variables integrated into its own variables:

http://thread.gmane.org/gmane.comp.programming.tools.cmake.devel/2574

Then there's optional dependencies too, which would have to be found, and 
which might have an effect on how the variables are populated... You can't 
stuff everything into a macro like that. It becomes very unwieldy and I 
don't think it's flexible enough.

Thanks,

Steve.





More information about the Kde-frameworks-devel mailing list