Config files for frameworks (Was: KArchive for Qt4)

Alexander Neundorf neundorf at kde.org
Sun Dec 16 15:11:03 UTC 2012


On Thursday 29 November 2012, Stephen Kelly wrote:
> Alexander Neundorf wrote:
> > The code for creating a Config.cmake file is not trivial, but IMO also
> > not boilerplate, and Stephen agreed in Berlin that this will have to be
> > done individually be every project. This is the added
> > threadweaverConfig.cmake.in and the call to
> > configure_package_config_file() in the CMakeLists.txt.

...
> 2) You are setting things that do not need to be set:
> 
>  * Eg: kwidgetsaddons_INCLUDE_DIR, kwidgetsaddons_LIBRARY_DIR.
> 
> The kwidgetsaddons_LIBRARY_DIR is not needed at all. That's the kind of
> thing that you only need (and put in the cache) if you're writing a Find

I was about to remove the LIBRARY_DIR variable, but...
the user may want to use the Foo_LIBRARY_DIR variable for setting the RPATH of 
his own executables.
If this variable is not provided, he would have to get the location property 
of one of the imported library targets and use get_filename_component() on it.
RPATH is only set automatically if the property INSTALL_RPATH_USE_LINK_PATH is 
enabled on a target, which is not the case by default.

Alex


More information about the Kde-frameworks-devel mailing list