[CMake] Finder repository

Alan W. Irwin irwin at beluga.phys.uvic.ca
Wed May 28 21:15:57 EDT 2008


Hi Alex,

I agree with most of what you say, and have just one added point.

On 2008-05-28 21:49+0200 Alexander Neundorf wrote:

> Parsing the (pkg-config) stdout which
> contains "-I/some/dir" is not really nice. Having some nicely structured
> information would be better.

Agreed.  Nevertheless, to deal with the current pkg-config results
you could use an idea similar to the transformation from the
pkg-config '-L dir -llib' form to absolute pathnames for libraries that was
discussed previously in this thread.  The additional idea is for the macros
in FindPkgConfig.cmake to translate from the '-I/some/dir -I/someother/dir'
form to a list of full pathnames for include directories.

If there is a volunteer to do those two changes (in a backwards
compatible way, of course) to FindPkgConfig.cmake, I would be happy to test
results on Linux. I would prefer not to be the actual volunteer doing the
FindPkgConfig.cmake changes since my experience is limited just to Linux
(and in fact just to C/C++ compilers that accept -I options so I didn't
realize before you mentioned it that -I options were an issue for some
compilers).  The volunteer should have access to a wide variety of windows
platforms to do all the necessary testing for those platforms.

BTW, the macro I currently use to translate from the '-L dir -llib' form to
absolute pathnames for libraries is called cmake_link_flags and
can be found at
http://plplot.svn.sourceforge.net/viewvc/plplot/trunk/cmake/modules/pkg-config.cmake?revision=8403&view=markup
Something similar to this macro could be used for the suggested
'-I/some/dir -I/someother/dir' translation.

I would be happy to donate this macro to the CMake project as a starting
approximation for what is required to upgrade FindPkgConfig.cmake in the
ways suggested.

Alan
__________________________
Alan W. Irwin

Astronomical research affiliation with Department of Physics and Astronomy,
University of Victoria (astrowww.phys.uvic.ca).

Programming affiliations with the FreeEOS equation-of-state implementation
for stellar interiors (freeeos.sf.net); PLplot scientific plotting software
package (plplot.org); the libLASi project (unifont.org/lasi); the Loads of
Linux Links project (loll.sf.net); and the Linux Brochure Project
(lbproject.sf.net).
__________________________

Linux-powered Science
__________________________


More information about the CMake mailing list