empty vs notfound

Alexander Neundorf neundorf at kde.org
Tue Jan 9 17:55:21 CET 2007


On Tuesday 09 January 2007 15:21, David Faure wrote:
> FindFontconfig says
>
>   if (FONTCONFIG_LIBRARIES)
>      set(FONTCONFIG_FOUND TRUE)
>   endif (FONTCONFIG_LIBRARIES)

You mean:

if (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS)
  # in cache already
  set(FONTCONFIG_FOUND TRUE)
else (FONTCONFIG_LIBRARIES AND FONTCONFIG_DEFINITIONS)

right ?

> and doesn't test FONTCONFIG_INCLUDE_DIR because it's ok if that one is
> empty, as happens when fontconfig is in /usr/include (right?)

Even if the headers are in /usr/include, FONTCONFIG_INCLUDE_DIR shouldn't be 
empty, but, well, "/usr/include".

> However this breaks when it's set to FONTCONFIG_INCLUDE_DIR-NOTFOUND,
> i.e. when the headers are not found at all - then FONTCONFIG_FOUND is still
> set to TRUE, and the use of FONTCONFIG_INCLUDE_DIR in cmakelists.txt leads
> to an error.
>
> How can we check that FONTCONFIG_INCLUDE_DIR is "set, or empty, but not
> NOTFOUND" ?

I think you don't want to do this :-)

I committed a small change, now FONTCONFIG_INCLUDE_DIR is actually used 
instead of FONTCONFIG_DEFINITIONS.
Beside that I think that these optimizations don't bring a lot. It's the sheer 
amount of cmake script which is processed, and which is distributed in small 
pieces in many directories.

Bye
Alex
-- 
Work: alexander.neundorf AT jenoptik.com - http://www.jenoptik-los.de
Home: neundorf AT kde.org                - http://www.kde.org
      alex AT neundorf.net               - http://www.neundorf.net


More information about the Kde-buildsystem mailing list