KDECompilerSettings.cmake added to extra-cmake-modules

Alexander Neundorf neundorf at kde.org
Sat Feb 18 12:46:54 UTC 2012


On Saturday 18 February 2012, David Faure wrote:
> On Friday 17 February 2012 18:58:04 Alexander Neundorf wrote:
> > Or should we just declare that by including that file (which you don't
> > have to do) you just get those flags automatically ?
> 
> That seems like the best solution to me.
> Why use two lines to do what you can do in one line.

I think so too.
For those who want to have more control, some control variables could be 
provided:

set(KDE_BUILD_FLAGS_SKIP_LINK_FLAGS  TRUE)
set(KDE_BUILD_FLAGS_SKIP_DEFINITIONS TRUE)
include(KDEBuildFlags)

And, in the mean time I'm not sure KDECompilerSettings.cmake is the best 
name...
 
> This is much like include(KDE4Defaults.cmake). In fact they could possibly
> be merged, if that one still exists.

This or a similar file will stay.
It will have a bunch of settings.
I think I'll move the RPATH settings from KDEBuildFlags.cmake to this file.


This would mean, if you just want to use some KDE libraries, you would do:

find_package(extra-cmake-modules REQUIRED)
find_package(kcore)
find_package(kui)

...and then use them.

If you want to use the compile flags and link flags as suggested by the KDE 
team, you additionally do

include(KDEBuildFlags)

If you additionally want to use the various other cmake settings considered 
useful by the KDE team, you do

include(KDESettings)


If you additionally want to use the install locations as defined by KDE, you 
do

include(KDEInstallDirs)


So, how to name these files ?

For the compile and link flags:
KDE + (Compile|Build|Compiler) + (Flags|Settings) ?

for the cmake settings:

KDESettings, KDEDefaults, KDECMakeSettings ? 


Alex


More information about the Kde-frameworks-devel mailing list