X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=cmake%2FFindSalomeCAS.cmake;h=37c70283cdccb363131aed28373f323163ad6229;hb=refs%2Fheads%2Frnv%2Focct_freetype;hp=f1c843cd30cc1bdff7ee12e1bbd05b9467fc673a;hpb=ddb7f7f158f94972b06ba44d9df06ece48655b9c;p=tools%2Fconfiguration.git diff --git a/cmake/FindSalomeCAS.cmake b/cmake/FindSalomeCAS.cmake index f1c843c..37c7028 100755 --- a/cmake/FindSalomeCAS.cmake +++ b/cmake/FindSalomeCAS.cmake @@ -51,6 +51,25 @@ ELSE() SET(CAS_BINPLUGIN TKBin) ENDIF() +# Workaround: detect and add freetype to CAS_INCLUDE_DIRS +# It will be suppressed after migration OCCT detection procedure to CONFIG mode +# and the correction of the several bugs in the OCCT CMake configuration. +SET(Freetype_DIR $ENV{FREETYPE_ROOT_DIR}) +# Standard CMake Findfreetype.cmake doesn't find ft2build.h, do it manually: +# 1. Find custom freetype +FIND_PATH( FREETYPE_INCLUDE_DIR_ft2build ft2build.h + PATHS $ENV{FREETYPE_ROOT_DIR} + PATH_SUFFIXES include/freetype2 include freetype2 + NO_DEFAULT_PATH ) + +# 2. Find native freetype, if custom doesn't found: +IF(NOT FREETYPE_INCLUDE_DIR_ft2build) + FIND_PATH( FREETYPE_INCLUDE_DIR_ft2build ft2build.h + PATH_SUFFIXES include/freetype2 include freetype2 ) +ENDIF() +SET(CAS_INCLUDE_DIRS ${CAS_INCLUDE_DIRS} ${FREETYPE_INCLUDE_DIR_freetype2} ${FREETYPE_INCLUDE_DIR_ft2build}) +# End of workaround + IF(CAS_FOUND) SALOME_ACCUMULATE_HEADERS(CAS_INCLUDE_DIRS) SALOME_ACCUMULATE_ENVIRONMENT(LD_LIBRARY_PATH ${CAS_TKernel})