[cmake-developers] Alternative Config.cmake format

Alexander Neundorf neundorf at kde.org
Tue Nov 1 13:53:35 EDT 2011


On Tuesday 01 November 2011, Brad King wrote:
> On 11/1/2011 1:20 PM, Alexander Neundorf wrote:
> > Would you prefer XML, JSON or something else ?
> 
> I have no preference.  If the format is simple enough to parse in CMake
> code then it can't be too hard to parse with a C++ implementation later ;)
> 
> However, note that you're trying to set a precedent for a cross-platform
> replacement of pkg-config .pc files.  That may have implications on the
> format choice.

Yes, I'm aware of that.

> > When you write "Qt5Config.cmake that comes with Qt5 and *parses* the
> > Qt5Config.xml file itself" do you mean to file(READ ...) then xml file in
> > the Config.cmake file and then do a lot of regexp matching on the xml,
> > or do you have a better idea ?
> 
> Yes, I meant that the Qt5Config.cmake file should do the parsing.  You
> can use file(STRINGS) to load the input file as a list of lines suitable
> for use with foreach()'s "IN LISTS" mode.  

Ok.

Alex



More information about the cmake-developers mailing list