From 1e1e0c45ae14b17e65c16af1bb764b69c953896e Mon Sep 17 00:00:00 2001 From: rti Date: Mon, 28 Jun 2010 21:05:16 +0200 Subject: [PATCH] Fixed: #1000 ft2build.h not found by FindFreetype --- code/nel/CMakeModules/FindFreeType.cmake | 17 +++++++++++++++++ code/ryzom/CMakeModules/FindFreeType.cmake | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/code/nel/CMakeModules/FindFreeType.cmake b/code/nel/CMakeModules/FindFreeType.cmake index f013cede0..0ba439fb9 100644 --- a/code/nel/CMakeModules/FindFreeType.cmake +++ b/code/nel/CMakeModules/FindFreeType.cmake @@ -23,6 +23,23 @@ FIND_PATH(FREETYPE_INCLUDE_DIRS PATH_SUFFIXES freetype freetype2 ) +# ft2build.h does not reside in the freetype include dir +FIND_PATH(FREETYPE_ADDITIONAL_INCLUDE_DIR + ft2build.h + PATHS + /usr/local/include + /usr/include + /sw/include + /opt/local/include + /opt/csw/include + /opt/include +) + +# combine both include directories into one variable +IF(FREETYPE_ADDITIONAL_INCLUDE_DIR) + SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${FREETYPE_ADDITIONAL_INCLUDE_DIR}) +ENDIF(FREETYPE_ADDITIONAL_INCLUDE_DIR) + FIND_LIBRARY(FREETYPE_LIBRARY NAMES freetype libfreetype freetype219 PATHS diff --git a/code/ryzom/CMakeModules/FindFreeType.cmake b/code/ryzom/CMakeModules/FindFreeType.cmake index f013cede0..0ba439fb9 100644 --- a/code/ryzom/CMakeModules/FindFreeType.cmake +++ b/code/ryzom/CMakeModules/FindFreeType.cmake @@ -23,6 +23,23 @@ FIND_PATH(FREETYPE_INCLUDE_DIRS PATH_SUFFIXES freetype freetype2 ) +# ft2build.h does not reside in the freetype include dir +FIND_PATH(FREETYPE_ADDITIONAL_INCLUDE_DIR + ft2build.h + PATHS + /usr/local/include + /usr/include + /sw/include + /opt/local/include + /opt/csw/include + /opt/include +) + +# combine both include directories into one variable +IF(FREETYPE_ADDITIONAL_INCLUDE_DIR) + SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${FREETYPE_ADDITIONAL_INCLUDE_DIR}) +ENDIF(FREETYPE_ADDITIONAL_INCLUDE_DIR) + FIND_LIBRARY(FREETYPE_LIBRARY NAMES freetype libfreetype freetype219 PATHS