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.

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.  Note that CMake's list
processing doesn't like "[]" in the values due to backward compatibility
with registry value syntax, so JSON may be tricky if you use this approach.

-Brad
--

Powered by www.kitware.com

Visit other Kitware open-source projects at 
http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the CMake FAQ at: 
http://www.cmake.org/Wiki/CMake_FAQ

Follow this link to subscribe/unsubscribe:
http://public.kitware.com/cgi-bin/mailman/listinfo/cmake-developers

Reply via email to