Modified build system for itemmodels

Alexander Neundorf neundorf at kde.org
Sun May 6 09:37:04 UTC 2012


On Sunday 06 May 2012, Stephen Kelly wrote:
> Alexander Neundorf wrote:
> > attached are prototypes.
> > 
> > Please have a look (ignore the version-related stuff for now).
> > 
> > The Use-file is not there anymore, and the Config.cmake.in file is not
> > there anymore.
> > Instead it is now generated using the new function
> > ecm_write_basic_package_config_file(), which fits in style with
> > write_basic_package_version_file().
> > 
> > This way the developer only has to care about which information he wants
> > to put into the Config.cmake file, but does not have to care about more
> > details anymore.
> 
> I think this is a good goal.
> 
> > This is also generic enough to be put into e-c-m or directly into cmake
> > IMO.
> > 
> > 
> > Do you have a suggestion for what to do with the version stuff ?
> > You had more things in mind than the trivial version header as it is now.
> > 
> > 
> > Maybe all that (creating the config file, creating the config version
> > file, exporting the targets, installing those cmake files, creating the
> > version header) can then be put all together into one big macro:
> > 
> > kde_setup_package_stuff(NAME itemmodels
> > INSTALL_DESTINATION ${CMAKECONFIG_INSTALL_PREFIX}/itemmodels/
> > PATH_VARS    itemmodels_INCLUDE_DIR itemmodels_INSTALL_PREFIX
> > OTHER_VARS   itemmodels_LIBRARIES itemmodels_HAVE_Foo
> > EXTRA_CONFIG_STRING "#something more for the Config file"
> > VERSION_VAR  itemmodels_VERSION_STRING
> > COMPATIBLITY AnyNewerVersion
> > VERSION_HEADER ${CMAKE_BINARY_DIR}/itemmodels_version.h
> > EXPORTS  ItemModelsTargets )
> 
> The size of this is scary to me. There are so many arguments (even though
> they are named), that I don't know where to begin with it.

Yes, it's a lot, but I think there is no redundancy left.
"itemmodels" appears multiple times, but it doesn't increase the number of 
arguments.

> I also think ecm_write_basic_package_config_file has the same problem
> though, even though it has fewer arguments.


Alex


More information about the Kde-frameworks-devel mailing list