kdelibs FindFreetype.cmake broken: any ideas?

Benjamin Reed rangerrick at gmail.com
Mon Apr 9 14:02:48 CEST 2007


On 4/8/07, Brad Hards <bradh at frogmouth.net> wrote:
> On Saturday 07 April 2007 00:38, Benjamin Reed wrote:
> > When I try to build something that does:
> >
> >   INCLUDE_DIRECTORIES( ${FREETYPE_INCLUDE_DIR} )
> >
> > I end up with this on the compile line:
> >
> >   -I/opt/kde4-deps/include/freetype2\ -I/opt/kde4-deps/include
> No solution, but I am seeing the same problem.
>
> There is also something weird happening in kdegraphics. Looks like some
> applications are using the kdelibs FindFreetype.cmake, and some are using the
> kdegraphics FindFreeType2.cmake.

For the record, the fix was to use CMake's SEPARATE_ARGUMENTS function
to chop up the freetype-config output and then put each entry into
FREETYPE_INCLUDE_DIR separately so that it is a CMake list:

      SEPARATE_ARGUMENTS(_freetype_pkgconfig_output)
      FOREACH(value ${_freetype_pkgconfig_output})
        STRING(REGEX REPLACE "-I(.+)" "\\1" value "${value}")
        set(FREETYPE_INCLUDE_DIR ${FREETYPE_INCLUDE_DIR} ${value})
      ENDFOREACH(value)


More information about the Kde-buildsystem mailing list