Build Spring FREETYPE_INCLUDE_DIR
Posted: 14 Sep 2009, 15:29
When building spring 0.80.4.1 from source got this error.
After some picking in the files found that the error is in rts / build / cmake / FindFreetype.cmake.
Is due to the fact that the search script does not clear the cache before writing the found values.
to fix it just write
to line 50 (or somewhere after "if" and before "foreach").
like here
And it was not dissapeared after install all freetype development packages (from repository).CMake Error: The following variables are used in this project, but they are set to NOTFOUND.
Please set them or make sure they are set and tested correctly in the CMake files:
FREETYPE_INCLUDE_DIR (ADVANCED)
used as include directory in directory /home/arnial/Download/spring/spring_0.80.4.1/rts
used as include directory in directory /home/arnial/Download/spring/spring_0.80.4.1/rts/lib
used as include directory in directory /home/arnial/Download/spring/spring_0.80.4.1/rts/lib/streflop
used as include directory in directory /home/arnial/Download/spring/spring_0.80.4.1/tools/unitsync
After some picking in the files found that the error is in rts / build / cmake / FindFreetype.cmake.
Is due to the fact that the search script does not clear the cache before writing the found values.
to fix it just write
Code: Select all
set(FREETYPE_INCLUDE_DIR "")
like here
Code: Select all
if(FREETYPE_LIBRARIES AND _freetype_pkgconfig_output)
set(FREETYPE_FOUND TRUE)
# freetype-config can print out more than one -I, so we need to chop it up
# into a list and process each entry separately
separate_arguments(_freetype_pkgconfig_output)
set(FREETYPE_INCLUDE_DIR "")
foreach(value ${_freetype_pkgconfig_output})
string(REGEX REPLACE "-I(.+)" "\\1" value "${value}")
set(FREETYPE_INCLUDE_DIR ${FREETYPE_INCLUDE_DIR} ${value})
endforeach(value)
endif(FREETYPE_LIBRARIES AND _freetype_pkgconfig_output)