thorvg/src/meson.build
JunsuChoi abe7187f5b
ThorVG/Utils: Convert svg to png (#8)
* thorVG/example: added thorVG example app to convert svg to png

Rasterazing the svg file and extracting it as a png file.
The png encoder uses the 'lodepng' library.
(https://lodev.org/lodepng/)

Usage:
   svg2png [svgFileName] [Resolution] [bgColor]

Examples:
    $ svg2png input.svg
    $ svg2png input.svg 200x200
    $ svg2png input.svg 200x200 ff00ff

* ThorVG/Utils: Change examples to utils

* ThorVG/Utils: Move svg2png from util to src/bin

Renamed the build option for svg2png.
2020-09-16 11:11:50 +09:00

47 lines
1.2 KiB
Meson

compiler_flags = ['-DTVG_BUILD']
cc = meson.get_compiler('cpp')
if (cc.get_id() != 'msvc')
if get_option('vectors').contains('avx')
compiler_flags += ['-mavx']
message('Enable Advanced Vector Extension')
endif
compiler_flags += ['-fno-exceptions', '-fno-rtti',
'-fno-unwind-tables' , '-fno-asynchronous-unwind-tables',
'-Woverloaded-virtual', '-Wno-unused-parameter']
endif
subdir('lib')
subdir('loaders')
subdir('bindings')
thread_dep = meson.get_compiler('cpp').find_library('pthread')
thorvg_lib_dep = [common_dep, loader_dep, binding_dep, thread_dep]
thorvg_lib = library(
'thorvg',
include_directories : headers,
version : meson.project_version(),
dependencies : thorvg_lib_dep,
install : true,
cpp_args : compiler_flags,
gnu_symbol_visibility : 'hidden',
)
subdir('bin')
thorvg_dep = declare_dependency(
include_directories: headers,
link_with : thorvg_lib
)
pkg_mod = import('pkgconfig')
pkg_mod.generate(
libraries : thorvg_lib,
version : meson.project_version(),
name : 'libthorvg',
filebase : 'thorvg',
description : 'A Thor library for rendering vector graphics'
)