@ -37,6 +37,10 @@ option(HB_HAVE_FREETYPE "Enable freetype interop helpers" OFF)
option ( HB_HAVE_GRAPHITE2 "Enable Graphite2 complementary shaper" OFF )
option ( HB_HAVE_GLIB "Enable glib unicode functions" OFF )
option ( HB_HAVE_ICU "Enable icu unicode functions" OFF )
if ( TARGET freetype )
set ( HB_HAVE_FREETYPE ON )
add_definitions ( -DHAVE_FREETYPE=1 )
endif ( )
if ( APPLE )
option ( HB_HAVE_CORETEXT "Enable CoreText shaper backend on macOS" ON )
set ( CMAKE_MACOSX_RPATH ON )
@ -184,7 +188,7 @@ set (project_headers ${HB_BASE_headers})
set ( subset_project_headers ${ HB_SUBSET_headers } )
# # F i n d a n d i n c l u d e n e e d e d h e a d e r f o l d e r s a n d l i b r a r i e s
if ( HB_HAVE_FREETYPE )
if ( HB_HAVE_FREETYPE AND NOT TARGET freetype )
include ( FindFreetype )
if ( NOT FREETYPE_FOUND )
message ( FATAL_ERROR "HB_HAVE_FREETYPE was set, but we failed to find it. Maybe add a CMAKE_PREFIX_PATH= to your Freetype2 install prefix" )
@ -421,6 +425,10 @@ target_link_libraries(harfbuzz ${THIRD_PARTY_LIBS})
target_include_directories ( harfbuzz PUBLIC
" $ < B U I L D _ I N T E R F A C E : $ { C M A K E _ C U R R E N T _ S O U R C E _ D I R } / s r c > "
" $ < I N S T A L L _ I N T E R F A C E : $ { C M A K E _ I N S T A L L _ I N C L U D E D I R } / h a r f b u z z > " )
if ( HB_HAVE_FREETYPE AND TARGET freetype )
target_link_libraries ( harfbuzz PUBLIC freetype )
endif ( )
# # D e f i n e h a r f b u z z - i c u l i b r a r y
if ( HB_HAVE_ICU )