thorvg/src/meson.build
Hermet Park 9e1ba8d2c0 sw_engine: introduce avx simd instruction
avx is the cutting edge method for intel & amd cpus simd instruction.
We are going to support this feature for the desktop environment (instead of sse)

You can turn on this with configuration something like this:

$meson . build -Dvectors=avx

Current patch supports only for raster solid color

Change-Id: I068ba30a1f63d480415e2762f8021fc8d6d28a39
2020-07-11 20:58:09 +09:00

42 lines
1,016 B
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
endif
subdir('lib')
subdir('loaders')
subdir('examples')
thread_dep = meson.get_compiler('cpp').find_library('pthread')
thorvg_lib_dep = [common_dep, loader_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',
)
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'
)