diff options
author | Pierre Joye <pierre.php@gmail.com> | 2022-01-23 22:07:50 +0700 |
---|---|---|
committer | Pierre Joye <pierre.php@gmail.com> | 2022-01-23 22:07:50 +0700 |
commit | 9988dd140b21a60e6c3a82bd4d67d39cc7a1274e (patch) | |
tree | 5bc21fa70b97b616258f19b8c6b2679cf0ea0f32 | |
parent | 0f9dd9627aa9f5095164a73e84905bb4af4bfc8f (diff) | |
download | libgd-9988dd140b21a60e6c3a82bd4d67d39cc7a1274e.tar.gz |
#790 Disable RAQM if Freetype 2.11 or later is not present
-rw-r--r-- | cmake/modules/FindRAQM.cmake | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/cmake/modules/FindRAQM.cmake b/cmake/modules/FindRAQM.cmake index ffb908b..f6d0d9a 100644 --- a/cmake/modules/FindRAQM.cmake +++ b/cmake/modules/FindRAQM.cmake @@ -43,8 +43,19 @@ FIND_PATH(RAQM_INCLUDE_DIR raqm.h /usr/local/include /usr/include ) +FIND_PACKAGE(Freetype REQUIRED) +STRING(SUBSTRING ${FREETYPE_VERSION_STRING}, 0, 1, FT_MAJ) +STRING(SUBSTRING ${FREETYPE_VERSION_STRING}, 2, 2, FT_MIN) + +# matches 2.11 or later +if( FREETYPE_VERSION_STRING MATCHES "([2-9]+)\.(11|[1-9]{2})\.([0-9]+)" ) + message( "Minimal Freetype version for RAQM support found (${FREETYPE_VERSION_STRING})") +else() + message( FATAL_ERROR "RAQM Support requires Freetype 2.11.0 or later" ) +endif() SET(RAQM_NAMES ${RAQM_NAMES} raqm) + FIND_LIBRARY(RAQM_LIBRARY NAMES ${RAQM_NAMES} PATH /usr/local/lib /usr/lib |