Build Spring FREETYPE_INCLUDE_DIR

Build Spring FREETYPE_INCLUDE_DIR

Discuss your problems with the latest release of the engine here. Problems with games, maps or other utilities belong in their respective forums.

Moderator: Moderators

Post Reply
Arnial
Posts: 1
Joined: 14 Sep 2009, 14:51

Build Spring FREETYPE_INCLUDE_DIR

Post by Arnial »

When building spring 0.80.4.1 from source got this error.
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
And it was not dissapeared after install all freetype development packages (from repository).

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 "")
to line 50 (or somewhere after "if" and before "foreach").

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)

Post Reply

Return to “Help & Bugs”