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

Alexander Neundorf neundorf at kde.org
Tue Feb 21 15:17:35 EST 2012


On Friday 17 February 2012, Alexander Neundorf wrote:
> 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).

Ok, so we stay here with "PACKAGE", also in the light of the new "CONFIG" 
keyword for find_package() ?

Alex



More information about the cmake-developers mailing list