mirror of
https://github.com/thorvg/thorvg.git
synced 2025-06-08 13:43:43 +00:00
wg_engineL fix test build scripts and ambiguous declarations
Issue https://github.com/thorvg/thorvg/issues/2938
This commit is contained in:
parent
c49cb49e5c
commit
4b6f2172be
2 changed files with 17 additions and 7 deletions
|
@ -1,9 +1,11 @@
|
|||
examples_compiler_flags = compiler_flags
|
||||
|
||||
if lib_type == 'static'
|
||||
compiler_flags += ['-DTVG_STATIC']
|
||||
examples_compiler_flags += ['-DTVG_STATIC']
|
||||
endif
|
||||
|
||||
if target_opengles
|
||||
compiler_flags += '-DTHORVG_GL_TARGET_GLES=1'
|
||||
examples_compiler_flags += '-DTHORVG_GL_TARGET_GLES=1'
|
||||
endif
|
||||
|
||||
examples_dep = [dependency('sdl2')]
|
||||
|
@ -13,7 +15,7 @@ if all_engines or get_option('engines').contains('wg')
|
|||
if host_machine.system() == 'darwin'
|
||||
add_languages('objcpp')
|
||||
examples_dep += declare_dependency(link_args: ['-lobjc', '-framework', 'Cocoa', '-framework', 'CoreVideo', '-framework', 'IOKit', '-framework', 'QuartzCore'])
|
||||
compiler_flags += ['-x', 'objective-c++']
|
||||
examples_compiler_flags += ['-x', 'objective-c++']
|
||||
endif
|
||||
endif
|
||||
|
||||
|
@ -86,7 +88,7 @@ foreach current_file : source_file
|
|||
executable(name, current_file,
|
||||
include_directories : headers,
|
||||
link_with : thorvg_lib,
|
||||
cpp_args : compiler_flags,
|
||||
cpp_args : examples_compiler_flags,
|
||||
dependencies : examples_dep)
|
||||
endforeach
|
||||
|
||||
|
@ -101,7 +103,7 @@ if get_option('bindings').contains('capi')
|
|||
executable(name, current_file,
|
||||
include_directories : headers,
|
||||
link_with : thorvg_lib,
|
||||
cpp_args : compiler_flags,
|
||||
cpp_args : examples_compiler_flags,
|
||||
dependencies : examples_dep)
|
||||
endforeach
|
||||
endif
|
||||
|
|
|
@ -1,5 +1,12 @@
|
|||
test_compiler_flags = compiler_flags
|
||||
|
||||
if lib_type == 'static'
|
||||
compiler_flags += ['-DTVG_STATIC']
|
||||
test_compiler_flags += ['-DTVG_STATIC']
|
||||
endif
|
||||
|
||||
test_dep = []
|
||||
if host_machine.system() == 'darwin'
|
||||
test_dep += declare_dependency(link_args: ['-framework', 'Cocoa', '-framework', 'IOKit'])
|
||||
endif
|
||||
|
||||
test_file = [
|
||||
|
@ -23,7 +30,8 @@ tests = executable('tvgUnitTests',
|
|||
test_file,
|
||||
include_directories : headers,
|
||||
link_with : thorvg_lib,
|
||||
cpp_args : compiler_flags)
|
||||
cpp_args : test_compiler_flags,
|
||||
dependencies : test_dep)
|
||||
|
||||
test('Unit Tests', tests, args : ['--success'])
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue