build: refactoring meson script.

move out engine/loader dependency to its immediate parent folders.

Change-Id: I7f08433fc6d2a333951fceaffea81cbe2e5da9e3
This commit is contained in:
Hermet Park 2020-07-08 10:51:34 +09:00
parent e2fc353846
commit 84af527a27
4 changed files with 13 additions and 7 deletions

View file

@ -1,6 +1,6 @@
project('thorvg', project('thorvg',
'cpp', 'cpp',
default_options : ['buildtype=debugoptimized', 'werror=false', 'cpp_std=c++17', 'optimization=s'], default_options : ['buildtype=debugoptimized', 'werror=false', 'optimization=s'],
version : '0.1.0', version : '0.1.0',
license : 'Apache-2.0') license : 'Apache-2.0')

View file

@ -25,8 +25,10 @@ source_file = [
'tvgSwCanvas.cpp', 'tvgSwCanvas.cpp',
] ]
src_dep = declare_dependency( engine_dep = [swengine_dep, glengine_dep]
common_dep = declare_dependency(
dependencies : engine_dep,
include_directories : include_directories('.'), include_directories : include_directories('.'),
sources : source_file sources : source_file
) )

View file

@ -1 +1,6 @@
subdir('svg_loader') subdir('svg_loader')
loader_dep = declare_dependency(
dependencies : svgloader_dep,
include_directories : include_directories('.'),
)

View file

@ -5,8 +5,7 @@ subdir('loaders')
subdir('examples') subdir('examples')
thread_dep = meson.get_compiler('cpp').find_library('pthread') thread_dep = meson.get_compiler('cpp').find_library('pthread')
thorvg_lib_dep = [ src_dep, swengine_dep, glengine_dep, svgloader_dep, thread_dep] thorvg_lib_dep = [ common_dep, loader_dep, thread_dep]
thorvg_lib = library( thorvg_lib = library(
'thorvg', 'thorvg',