Thanks to visit codestin.com
Credit goes to Github.com

Skip to content
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 .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,4 @@ doc
*.tmp
*.code-workspace
.DS_Store
test/resources/saver*
6 changes: 6 additions & 0 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ webp_loader = all_loaders or get_option('loaders').contains('webp')
#Savers
all_savers = get_option('savers').contains('all')
gif_saver = all_savers or get_option('savers').contains('gif') or lottie2gif
png_saver = all_savers or get_option('savers').contains('png')

#logging
logging = get_option('log')
Expand Down Expand Up @@ -94,6 +95,10 @@ if gif_saver
config_h.set10('THORVG_GIF_SAVER_SUPPORT', true)
endif

if png_saver
config_h.set10('THORVG_PNG_SAVER_SUPPORT', true)
endif

#Vectorization
simd_type = 'none'

Expand Down Expand Up @@ -212,6 +217,7 @@ summary(
summary(
{
'GIF': gif_saver,
'PNG': png_saver,
},
section: 'Saver',
bool_yn: true,
Expand Down
2 changes: 1 addition & 1 deletion meson_options.txt
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ option('loaders',

option('savers',
type: 'array',
choices: ['', 'gif', 'all'],
choices: ['', 'png', 'gif', 'all'],
value: [''],
description: 'Enable File Savers in thorvg')

Expand Down
17 changes: 17 additions & 0 deletions src/common/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,23 @@ source_file = [
'tvgStr.cpp'
]

static_png = false
if png_saver or png_loader
if get_option('static')
static_png = true
else
png_dep = dependency('libpng', required: false)
static_png = not png_dep.found()
endif
endif

if static_png
source_file += [
'tvgPngCodec.h',
'tvgPngCodec.cpp',
]
endif

utils_dep = declare_dependency(
include_directories : include_directories('.'),
sources : source_file)
Loading
Loading