finding software with cmake

Andreas Pakulat apaku at
Fri Aug 3 21:11:52 BST 2007

On 03.08.07 14:54:12, Matthew Woehlke wrote:
> Matt Rogers wrote:
> >On Thursday 02 August 2007 21:49, Alexander Neundorf wrote:
> >>Regarding pkgconfig:
> >>it is useful, but it has issues.
> >>-it doesn't exist on all platforms
> >not true. see where it explicitly 
> >mentions Mac OS X and Windows.
> So installing pkg-config should be a hard requirement for Windows?

Not going to happen unless pkg-config is fixed for win32 (and no I don't
know what the specific issues are, Christian or Ralf know that, I never
even bothered to install it).

> >>-it doesn't work correctly if PKGCONFIG_PATH isn't set up correctly
> >not always true:
> >matt at silver ~ $ echo $PKG_CONFIG_PATH
> >matt at silver ~ $ pkg-config --cflags glib-2.0
> >-I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include
> Like everything else, it has defaults, yes. However if you install a pkg-config 
> package in a non-default location, you must also set PKGCONFIG_PATH (if the 
> build system is *relying* on pkg-config to find the package). I was bitten by 
> this the other day when kdelibs was changed to *require* pkg-config to find 
> strigi (previously, things Just Worked; after, CMake failed with a fatal error 
> and I couldn't build kdelibs).
> I'm with Alex, *relying* on pkg-config is a nuisance that should be avoided if 
> possible.


> >>Instead, if even with the changes above some stuff isn't found by the
> >>FIND_XXX() commands, you can set the CMAKE_INCLUDE_PATH, CMAKE_PROGRAM_PATH
> >>and  CMAKE_LIBRARY_PATH environment variables to tell cmake about
> >>additional directories where FIND_XXX() should search.
> >Are these environment variables set in the shell or as arguments to cmake?
> Both, I thought, but you'd have to check.

Right, both ways is possible.


Don't get to bragging.

More information about the kde-core-devel mailing list