Skip to content
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

Fixes Cairo-enabled build breakage from "Add C++17 compatibility in a… #196

Open
wants to merge 2 commits into
base: main
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
1 change: 1 addition & 0 deletions svgnative/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ endif()
# setting for Cairo
################################
if(CAIRO)
set(CMAKE_CXX_STANDARD 17)
# cmake wants to have full pathname of libcairo, instead of compiler flags.
# thus FindCairo.cmake works better than pkg_check_modules(CAIRO cairo)
include(FindCairo)
Expand Down
2 changes: 1 addition & 1 deletion svgnative/src/ports/cairo/CairoSVGRenderer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ inline void createCairoPattern(const Paint& paint, float opacity, cairo_pattern_
{
*pat = NULL;

if (paint.type() != typeid(Gradient))
if (!SVGNative::holds_alternative<Gradient>(paint))
return;

const auto& gradient = SVGNative::get<Gradient>(paint);
Expand Down