gr-fosphor/cmake: Fix FindFreetype2 to properly cache the include dir var

Without caching, this would cause a problem with headers not being found
if you did the cmake step twice because the FREETYPE2_FOUND var is cached
and so it wouldn't run through that script again and wouldn't set
FREETYPE2_INCLUDE_DIRS.

Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
This commit is contained in:
Sylvain Munaut 2014-07-22 10:11:29 +02:00
parent b24ba23784
commit 30dbdbde79
1 changed files with 2 additions and 2 deletions

View File

@ -70,9 +70,9 @@ if(NOT FREETYPE2_FOUND)
if(FREETYPE2_INCLUDE_DIR_ftheader)
string(COMPARE EQUAL ${FREETYPE2_INCLUDE_DIR_ft2build} ${FREETYPE2_INCLUDE_DIR_ftheader} FREETYPE2_DIRS_SAME)
if(FREETYPE2_DIRS_SAME)
set(FREETYPE2_INCLUDE_DIRS ${FREETYPE2_INCLUDE_DIR_ft2build})
set(FREETYPE2_INCLUDE_DIRS ${FREETYPE2_INCLUDE_DIR_ft2build} CACHE INTERNAL "freetype2 include directories")
else()
set(FREETYPE2_INCLUDE_DIRS ${FREETYPE2_INCLUDE_DIR_ft2build};${FREETYPE2_INCLUDE_DIR_ftheader})
set(FREETYPE2_INCLUDE_DIRS ${FREETYPE2_INCLUDE_DIR_ft2build};${FREETYPE2_INCLUDE_DIR_ftheader} CACHE INTERNAL "freetype2 include directories")
endif()
find_library(FREETYPE2_LIBRARIES