mirror of
https://port.numenaute.org/aleajactaest/khanat-opennel-code.git
synced 2024-11-10 09:19:01 +00:00
Changed: Best fix for Freetype new layout (we only just need to include ft2build.h as done in font_generator.h)
This commit is contained in:
parent
5317c9f080
commit
a5a9532a13
2 changed files with 7 additions and 21 deletions
|
@ -9,21 +9,7 @@ IF(FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS)
|
||||||
SET(Freetype_FIND_QUIETLY TRUE)
|
SET(Freetype_FIND_QUIETLY TRUE)
|
||||||
ENDIF(FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS)
|
ENDIF(FREETYPE_LIBRARIES AND FREETYPE_INCLUDE_DIRS)
|
||||||
|
|
||||||
FIND_PATH(FREETYPE_INCLUDE_DIRS
|
FIND_PATH(FREETYPE_INCLUDE_DIR
|
||||||
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
|
|
||||||
ft2build.h
|
ft2build.h
|
||||||
PATHS
|
PATHS
|
||||||
/usr/local/include
|
/usr/local/include
|
||||||
|
@ -35,10 +21,9 @@ FIND_PATH(FREETYPE_ADDITIONAL_INCLUDE_DIR
|
||||||
PATH_SUFFIXES freetype2
|
PATH_SUFFIXES freetype2
|
||||||
)
|
)
|
||||||
|
|
||||||
# combine both include directories into one variable
|
IF(FREETYPE_INCLUDE_DIR)
|
||||||
IF(FREETYPE_ADDITIONAL_INCLUDE_DIR)
|
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIR})
|
||||||
SET(FREETYPE_INCLUDE_DIRS ${FREETYPE_INCLUDE_DIRS} ${FREETYPE_ADDITIONAL_INCLUDE_DIR})
|
ENDIF(FREETYPE_INCLUDE_DIR)
|
||||||
ENDIF(FREETYPE_ADDITIONAL_INCLUDE_DIR)
|
|
||||||
|
|
||||||
FIND_LIBRARY(FREETYPE_LIBRARY_RELEASE
|
FIND_LIBRARY(FREETYPE_LIBRARY_RELEASE
|
||||||
NAMES freetype libfreetype freetype219 freetype246
|
NAMES freetype libfreetype freetype219 freetype246
|
||||||
|
|
|
@ -29,7 +29,8 @@ using namespace std;
|
||||||
|
|
||||||
#ifndef NL_DONT_USE_EXTERNAL_CODE
|
#ifndef NL_DONT_USE_EXTERNAL_CODE
|
||||||
|
|
||||||
#include <freetype.h>
|
#include <ft2build.h>
|
||||||
|
#include FT_FREETYPE_H
|
||||||
|
|
||||||
// for freetype 2.0
|
// for freetype 2.0
|
||||||
#ifdef FTERRORS_H
|
#ifdef FTERRORS_H
|
||||||
|
@ -51,7 +52,7 @@ int err_code;
|
||||||
const char* err_msg;
|
const char* err_msg;
|
||||||
} ft_errors[] =
|
} ft_errors[] =
|
||||||
|
|
||||||
#include <fterrors.h>
|
#include FT_ERRORS_H
|
||||||
|
|
||||||
using namespace NLMISC;
|
using namespace NLMISC;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue