Re: [cmake-developers] Alternative Config.cmake format (was: Installing Qt5Config.cmake from the Qt repo?)

2011-11-01 Thread Brad King

On 10/31/2011 5:20 PM, Alexander Neundorf wrote:

Not sure what the other cmake developers would think about supporting an
additional file format for the Config.cmake files, e.g. xml or json, so they
could be easily used and generated also by other tools. I.e. not only by/for
cmake, but basically a standard format for installed libraries to provide
information about themselves.

Something like:
libs
   lib
  nameQtCore/name
  configsdebug;release/configs
  location config=debug/usr/lib/libQtCore.so/location
  include/usr/include/QtCore/include
  ...
   /lib
/libs


I've thought about that a few times.  This kind of format is hard to define
generally without lots of use cases.  I suggest that you design a prototype
for such a format that is sufficient for Qt's needs.  Write a Qt5Config.cmake
that comes with Qt5 and *parses* the Qt5Config.xml file itself and sets the
proper variables as CMake code expects.  Then you can tweak and refine it
without being delayed by CMake's release schedule since the parser comes with
the format.  After it has matured and perhaps a few other projects have
picked it up we can consider adding first-class support for it in CMake.

-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


Re: [cmake-developers] Alternative Config.cmake format (was: Installing Qt5Config.cmake from the Qt repo?)

2011-11-01 Thread Alexander Neundorf
On Tuesday 01 November 2011, Brad King wrote:
 On 10/31/2011 5:20 PM, Alexander Neundorf wrote:
  Not sure what the other cmake developers would think about supporting an
  additional file format for the Config.cmake files, e.g. xml or json, so
  they could be easily used and generated also by other tools. I.e. not
  only by/for cmake, but basically a standard format for installed
  libraries to provide information about themselves.
  
  Something like:
  libs
  
 lib
 
nameQtCore/name
configsdebug;release/configs
location config=debug/usr/lib/libQtCore.so/location
include/usr/include/QtCore/include
...
 
 /lib
  
  /libs
 
 I've thought about that a few times.  This kind of format is hard to define
 generally without lots of use cases.  I suggest that you design a prototype
 for such a format that is sufficient for Qt's needs.  Write a
 Qt5Config.cmake that comes with Qt5 and *parses* the Qt5Config.xml file
 itself and sets the proper variables as CMake code expects.  Then you can
 tweak and refine it without being delayed by CMake's release schedule
 since the parser comes with the format.  After it has matured and perhaps
 a few other projects have picked it up we can consider adding first-class
 support for it in CMake.

Hmm, ok.

Would you prefer XML, JSON or something else ?

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 ?

Alex
--

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