[cmake-developers] Making Config.cmake files easier to write

Alexander Neundorf neundorf at kde.org
Fri Feb 17 05:52:19 EST 2012


On Thursday 16 February 2012, Brad King wrote:
> On 2/16/2012 1:24 PM, Alexander Neundorf wrote:
> > Actually I expected I would prefer this over the fixed names, but now
> > that I've done it and look at what Config.cmake.in file I have to write,
> > I think I liked the previous version with the fixed names
> > (CONFIG_HELPER) better. I think it was easier to do, a simple scheme.
> 
> I think the fixed names are better/simpler too.  I'm not fond of
> "CONFIG_HELPER" specifically.  The information stored in them is
> about the *package* that the file is configuring, which is why
> I originally proposed the prefix "PACKAGE_".  The INCLUDE_INSTALL_DIR
> is where the *package* goes, not where the config helper is/goes.
> 
> It's also the same as the package version file input/output
> variable names.

I looked a bit around cmFindPackage.
It has a parameter "CONFIGS", it has a "Config mode" and the documentation and 
error messages use "configuration file".
So, I'm not that sure that using "PACKAGE" instead of "CONFIG" is really 
better (the branch I pushed uses "PACKAGE", but I could change this again).

Alex



More information about the cmake-developers mailing list