diff --git a/code/CMakeModules/FindFreeType.cmake b/code/CMakeModules/FindFreeType.cmake index 4fa82f457..36d109a18 100644 --- a/code/CMakeModules/FindFreeType.cmake +++ b/code/CMakeModules/FindFreeType.cmake @@ -9,21 +9,7 @@ IF(FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS) SET(Freetype_FIND_QUIETLY TRUE) ENDIF(FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS) -FIND_PATH(FREETYPE_INCLUDE_DIRS - freetype.h - PATHS - $ENV{FREETYPE_DIR}/include - /usr/local/include - /usr/include - /sw/include - /opt/local/include - /opt/csw/include - /opt/include - PATH_SUFFIXES freetype2/freetype freetype freetype2 -) - -# ft2build.h does not reside in the freetype include dir -FIND_PATH(FREETYPE_ADDITIONAL_INCLUDE_DIR +FIND_PATH(FREETYPE_INCLUDE_DIR ft2build.h PATHS /usr/local/include @@ -35,10 +21,9 @@ FIND_PATH(FREETYPE_ADDITIONAL_INCLUDE_DIR PATH_SUFFIXES freetype2 ) -# 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) +IF(FREETYPE_INCLUDE_DIR) + SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIR}) +ENDIF(FREETYPE_INCLUDE_DIR) FIND_LIBRARY(FREETYPE_LIBRARY_RELEASE NAMES freetype libfreetype freetype219 freetype246 diff --git a/code/nel/src/3d/font_generator.cpp b/code/nel/src/3d/font_generator.cpp index e8949876c..0e268a0c2 100644 --- a/code/nel/src/3d/font_generator.cpp +++ b/code/nel/src/3d/font_generator.cpp @@ -29,7 +29,8 @@ using namespace std; #ifndef NL_DONT_USE_EXTERNAL_CODE -#include +#include +#include FT_FREETYPE_H // for freetype 2.0 #ifdef FTERRORS_H @@ -51,7 +52,7 @@ int err_code; const char* err_msg; } ft_errors[] = -#include +#include FT_ERRORS_H using namespace NLMISC;