thorvg/test/meson.build
Vincent Torri be2de28312 portability: fix usage of TVG_API
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
2023-05-16 18:55:33 +09:00

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