8000 #790 Disable RAQM if Freetype 2.11 or later is not present by pierrejoye · Pull Request #804 · libgd/libgd · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

#790 Disable RAQM if Freetype 2.11 or later is not present #804

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/ci_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ jobs:
CFLAGS: ${{ matrix.config.cflags }}
run:
cmake -G "Unix Makefiles" -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_WEBP=1
-DENABLE_TIFF=1 -DENABLE_XPM=1 -DENABLE_GD_FORMATS=1 -DENABLE_HEIF=1 -DENABLE_RAQM=1 -DENABLE_AVIF=1
-DENABLE_TIFF=1 -DENABLE_XPM=1 -DENABLE_GD_FORMATS=1 -DENABLE_HEIF=1 -DENABLE_RAQM=0 -DENABLE_AVIF=1
-DBUILD_TEST=1 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}
-DCMAKE_TOOLCHAIN_FILE=${{github.workspace}}/cmake/modules/linux-clang.cmake

Expand All @@ -149,7 +149,7 @@ jobs:
CFLAGS: ${{ matrix.config.cflags }}
run:
cmake -DENABLE_PNG=1 -DENABLE_FREETYPE=1 -DENABLE_JPEG=1 -DENABLE_WEBP=1
-DENABLE_TIFF=1 -DENABLE_XPM=1 -DENABLE_GD_FORMATS=1 -DENABLE_HEIF=1 -DENABLE_RAQM=1 -DENABLE_AVIF=1
-DENABLE_TIFF=1 -DENABLE_XPM=1 -DENABLE_GD_FORMATS=1 -DENABLE_HEIF=1 -DENABLE_RAQM=0 -DENABLE_AVIF=1
-DBUILD_TEST=1 -B ${{github.workspace}}/build -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}}

- name: Build
Expand Down
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ OPTION(ENABLE_FONTCONFIG "Enable FontConfig support" 0)
OPTION(ENABLE_WEBP "Enable WebP support" 0)
OPTION(ENABLE_HEIF "Enable HEIF support" 0)
OPTION(ENABLE_AVIF "Enable AVIF support" 0)
OPTION(ENABLE_RAQM "Enable RAQM support" 0)
OPTION(ENABLE_RAQM "Enable experimental RAQM support" 0)
OPTION(ENABLE_ASAN "Enable (gcc) ASAN support" 0)
OPTION(ENABLE_CPP "Enable CPP GD API" 1)
OPTION(VERBOSE_MAKEFILE "Enable CMAKE_VERBOSE_MAKEFILE" 0)
Expand Down
11 changes: 11 additions & 0 deletions cmake/modules/FindRAQM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
0