[Maybe we should move this to another thread
]
Yeah ok we surely dont have the same version considering I downloaded the most recent but by looking into my findfreetype.cmake in Cmake 2.8 this is what I have which seems to pretty much fit what you are talking about so...:
BTW, manually adding the var in cmake (like for GAE_WINDEPS) makes it work, but will it induce other problems? (like not using the proper version of something? it is compiling and linking fine....)
PS: I pasted everything from the file besides the top comments.
FIND_PATH(FREETYPE_INCLUDE_DIR_ft2build ft2build.h
HINTS
$ENV{FREETYPE_DIR}
PATHS
/usr/local/X11R6/include
/usr/local/X11/include
/usr/freeware/include
)
FIND_PATH(FREETYPE_INCLUDE_DIR_freetype2 freetype/config/ftheader.h
HINTS
$ENV{FREETYPE_DIR}/include/freetype2
PATHS
/usr/local/X11R6/include
/usr/local/X11/include
/usr/freeware/include
PATH_SUFFIXES freetype2
)
FIND_LIBRARY(FREETYPE_LIBRARY
NAMES freetype libfreetype freetype219
HINTS
$ENV{FREETYPE_DIR}
PATH_SUFFIXES lib64 lib
PATHS
/usr/local/X11R6
/usr/local/X11
/usr/freeware
)
# set the user variables
IF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
SET(FREETYPE_INCLUDE_DIRS "${FREETYPE_INCLUDE_DIR_ft2build};${FREETYPE_INCLUDE_DIR_freetype2}")
ENDIF(FREETYPE_INCLUDE_DIR_ft2build AND FREETYPE_INCLUDE_DIR_freetype2)
SET(FREETYPE_LIBRARIES "${FREETYPE_LIBRARY}")
# handle the QUIETLY and REQUIRED arguments and set FREETYPE_FOUND to TRUE if
# all listed variables are TRUE
INCLUDE(${CMAKE_CURRENT_LIST_DIR}/FindPackageHandleStandardArgs.cmake)
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Freetype DEFAULT_MSG FREETYPE_LIBRARY FREETYPE_INCLUDE_DIRS)
MARK_AS_ADVANCED(FREETYPE_LIBRARY FREETYPE_INCLUDE_DIR_freetype2 FREETYPE_INCLUDE_DIR_ft2build)