FindGLIB2.cmake doesn't find glibconfig.h

Allen Winter winter at kde.org
Wed Jun 18 14:38:02 CEST 2008


On Wednesday 18 June 2008 06:00:21 Andreas Pakulat wrote:
> Hi,
> 
> glibconfig.h is needed to compile anything against glib headers but the
> finding of that file is only optional in FindGLIB2.cmake. Also it only
> looks into the include dir itself, but distro's start to put such
> headers into <prefix>/lib/<libname>/include/ because its
> architecture-dependant.
> 
> The kdebase build breaks here because the include dir isn't set
> apropriately. I'll try to come up with a patch later tonight, unless
> someone beats me to it.
> 
I remember Alex and myself fighting with FindGLIB2 previously.

Probably the following is where you need to hack:
find_path(GLIB2_INTERNAL_INCLUDE_DIR glibconfig.h
          PATH_SUFFIXES glib-2.0/include
          PATHS ${_LibGLIB2IncDir} "${glib2LibDir}" ${CMAKE_SYSTEM_LIBRARY_PATH})

and I guess you change things so GLIB2_Found is false if
glibconfig.h is not located.


More information about the Kde-buildsystem mailing list