@ -89,7 +89,7 @@ cmake_minimum_required(VERSION 2.8.12)
if ( NOT CMAKE_VERSION VERSION_LESS 3.3 )
# A l l o w s y m b o l v i s i b i l i t y s e t t i n g s a l s o o n s t a t i c l i b r a r i e s . C M a k e < 3 . 3
# o n l y s e t s t h e p r o p e r y o n a s h a r e d l i b r a r y b u i l d .
# o n l y s e t s t h e p r o p e r t y o n a s h a r e d l i b r a r y b u i l d .
cmake_policy ( SET CMP0063 NEW )
endif ( )
@ -137,15 +137,24 @@ set(VERSION_MAJOR "2")
set ( VERSION_MINOR "10" )
set ( VERSION_PATCH "1" )
# S O V E R S I O N s c h e m e : C U R R E N T . A G E . R E V I S I O N
# I f t h e r e w a s a n i n c o m p a t i b l e i n t e r f a c e c h a n g e :
# I n c r e m e n t C U R R E N T . S e t A G E a n d R E V I S I O N t o 0
# I f t h e r e w a s a c o m p a t i b l e i n t e r f a c e c h a n g e :
# I n c r e m e n t A G E . S e t R E V I S I O N t o 0
# I f t h e s o u r c e c o d e w a s c h a n g e d , b u t t h e r e w e r e n o i n t e r f a c e c h a n g e s :
# I n c r e m e n t R E V I S I O N .
set ( LIBRARY_VERSION "6.16.0" )
set ( LIBRARY_SOVERSION "6" )
# G e n e r a t e L I B R A R Y _ V E R S I O N a n d L I B R A R Y _ S O V E R S I O N .
set ( LIBTOOL_REGEX "version_info='([0-9]+):([0-9]+):([0-9]+)'" )
file ( STRINGS "${PROJECT_SOURCE_DIR}/builds/unix/configure.raw"
V E R S I O N _ I N F O
R E G E X $ { L I B T O O L _ R E G E X } )
string ( REGEX REPLACE
$ { L I B T O O L _ R E G E X } " \ \ 1 "
L I B T O O L _ C U R R E N T " $ { V E R S I O N _ I N F O } " )
string ( REGEX REPLACE
$ { L I B T O O L _ R E G E X } " \ \ 2 "
L I B T O O L _ R E V I S I O N " $ { V E R S I O N _ I N F O } " )
string ( REGEX REPLACE
$ { L I B T O O L _ R E G E X } " \ \ 3 "
L I B T O O L _ A G E " $ { V E R S I O N _ I N F O } " )
# T h i s i s w h a t l i b t o o l d o e s i n t e r n a l l y o n U n i x p l a t f o r m s .
math ( EXPR LIBRARY_SOVERSION "${LIBTOOL_CURRENT} - ${LIBTOOL_AGE}" )
set ( LIBRARY_VERSION "${LIBRARY_SOVERSION}.${LIBTOOL_AGE}.${LIBTOOL_REVISION}" )
# T h e s e o p t i o n s m e a n " r e q u i r e x a n d c o m p l a i n i f n o t f o u n d " . T h e y ' l l g e t
# o p t i o n a l l y f o u n d a n y w a y . U s e ` - D C M A K E _ D I S A B L E _ F I N D _ P A C K A G E _ x = T R U E ` t o d i s a b l e
@ -185,10 +194,11 @@ endif ()
# F i n d d e p e n d e n c i e s
set ( HARFBUZZ_MIN_VERSION "1.3.0" )
if ( FT_WITH_HARFBUZZ )
find_package ( HarfBuzz 1.3.0 REQUIRED )
find_package ( HarfBuzz ${ HARFBUZZ_MIN_VERSION } REQUIRED )
else ( )
find_package ( HarfBuzz 1.3.0 )
find_package ( HarfBuzz ${ HARFBUZZ_MIN_VERSION } )
endif ( )
if ( FT_WITH_PNG )
@ -411,23 +421,23 @@ set(PKG_CONFIG_REQUIRED_PRIVATE "")
if ( ZLIB_FOUND )
target_link_libraries ( freetype PRIVATE ${ ZLIB_LIBRARIES } )
target_include_directories ( freetype PRIVATE ${ ZLIB_INCLUDE_DIRS } )
list ( APPEND PKG_CONFIG_REQUIRED_PRIVATE zlib )
list ( APPEND PKG_CONFIG_REQUIRED_PRIVATE " zlib" )
endif ( )
if ( BZIP2_FOUND )
target_link_libraries ( freetype PRIVATE ${ BZIP2_LIBRARIES } )
target_include_directories ( freetype PRIVATE ${ BZIP2_INCLUDE_DIR } ) # n o t B Z I P 2 _ I N C L U D E _ D I R S
list ( APPEND PKG_CONFIG_REQUIRED_PRIVATE bzip2 )
list ( APPEND PKG_CONFIG_REQUIRED_PRIVATE " bzip2" )
endif ( )
if ( PNG_FOUND )
target_link_libraries ( freetype PRIVATE ${ PNG_LIBRARIES } )
target_compile_definitions ( freetype PRIVATE ${ PNG_DEFINITIONS } )
target_include_directories ( freetype PRIVATE ${ PNG_INCLUDE_DIRS } )
list ( APPEND PKG_CONFIG_REQUIRED_PRIVATE libpng )
list ( APPEND PKG_CONFIG_REQUIRED_PRIVATE " libpng" )
endif ( )
if ( HARFBUZZ_FOUND )
target_link_libraries ( freetype PRIVATE ${ HARFBUZZ_LIBRARIES } )
target_include_directories ( freetype PRIVATE ${ HARFBUZZ_INCLUDE_DIRS } )
list ( APPEND PKG_CONFIG_REQUIRED_PRIVATE harfbuzz )
list ( APPEND PKG_CONFIG_REQUIRED_PRIVATE " harfbuzz >= ${HARFBUZZ_MIN_VERSION}" )
endif ( )
@ -453,7 +463,7 @@ endif ()
if ( NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL )
# G e n e r a t e t h e p k g - c o n f i g f i l e
if ( UNIX )
file ( READ ${ PROJECT_SOURCE_DIR } /builds/unix/freetype2.in FREETYPE2_PC_IN )
file ( READ "${PROJECT_SOURCE_DIR}/builds/unix/freetype2.in" FREETYPE2_PC_IN )
string ( REPLACE ";" ", " PKG_CONFIG_REQUIRED_PRIVATE "${PKG_CONFIG_REQUIRED_PRIVATE}" )
@ -465,7 +475,7 @@ if (NOT SKIP_INSTALL_LIBRARIES AND NOT SKIP_INSTALL_ALL)
F R E E T Y P E 2 _ P C _ I N $ { F R E E T Y P E 2 _ P C _ I N } )
string ( REPLACE "%includedir%" "\${prefix}/${CMAKE_INSTALL_INCLUDEDIR}"
F R E E T Y P E 2 _ P C _ I N $ { F R E E T Y P E 2 _ P C _ I N } )
string ( REPLACE "%ft_version%" "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH }"
string ( REPLACE "%ft_version%" "${LIBTOOL_CURRENT}.${LIBTOOL_REVISION}.${LIBTOOL_AGE }"
F R E E T Y P E 2 _ P C _ I N $ { F R E E T Y P E 2 _ P C _ I N } )
string ( REPLACE "%REQUIRES_PRIVATE%" "${PKG_CONFIG_REQUIRED_PRIVATE}"
F R E E T Y P E 2 _ P C _ I N $ { F R E E T Y P E 2 _ P C _ I N } )