mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 05:33:36 +00:00

Rule of thumb on Windows: * for a DLL: * if the library is built, set TVG_API to __declspec(dllexport) * if the library is used, set TVG_API to __declspec(dllimport) * for a static library, set TVG_API to nothing To set TVG_API for a static library, TVG_STATIC is defined when the stataic library is built. Otherwise, TVG_API is correctly set for a DLL. Also sun and intel compilers are handled @issue: https://github.com/thorvg/thorvg/issues/1446
30 lines
634 B
Meson
30 lines
634 B
Meson
if (lib_type == 'static')
|
|
compiler_flags += ['-DTVG_STATIC']
|
|
endif
|
|
|
|
test_file = [
|
|
'testAccessor.cpp',
|
|
'testFill.cpp',
|
|
'testInitializer.cpp',
|
|
'testMain.cpp',
|
|
'testPaint.cpp',
|
|
'testPicture.cpp',
|
|
'testSavers.cpp',
|
|
'testScene.cpp',
|
|
'testShape.cpp',
|
|
'testSwCanvas.cpp',
|
|
'testSwCanvasBase.cpp',
|
|
'testSwEngine.cpp',
|
|
]
|
|
|
|
tests = executable('tvgUnitTests',
|
|
test_file,
|
|
include_directories : headers,
|
|
link_with : thorvg_lib,
|
|
cpp_args : compiler_flags)
|
|
|
|
test('Unit Tests', tests, args : ['--success'])
|
|
|
|
if get_option('bindings').contains('capi') == true
|
|
subdir('capi')
|
|
endif
|