2019-04-10 13:42:17 -05:00
|
|
|
# 23 march 2019
|
|
|
|
|
|
|
|
libui_test_sources = [
|
|
|
|
'initmain.c',
|
2019-04-10 19:11:44 -05:00
|
|
|
'main.c',
|
2019-04-10 13:42:17 -05:00
|
|
|
'testing.c',
|
|
|
|
]
|
|
|
|
|
2019-04-23 21:49:28 -05:00
|
|
|
if libui_OS == 'windows'
|
|
|
|
libui_test_sources += ['testing_windows.c']
|
|
|
|
elif libui_OS == 'darwin'
|
2019-04-22 22:01:55 -05:00
|
|
|
libui_test_sources += ['testing_darwin.c']
|
2019-04-23 11:26:52 -05:00
|
|
|
else
|
|
|
|
libui_test_sources += ['testing_unix.c']
|
2019-04-22 22:01:55 -05:00
|
|
|
endif
|
|
|
|
|
2019-04-23 21:49:28 -05:00
|
|
|
libui_test_deps = []
|
2019-04-21 16:59:29 -05:00
|
|
|
if libui_OS == 'windows'
|
|
|
|
libui_test_manifest = 'test.manifest'
|
|
|
|
if libui_mode == 'static'
|
|
|
|
libui_test_manifest = 'test.static.manifest'
|
|
|
|
endif
|
|
|
|
libui_test_sources += [
|
|
|
|
windows.compile_resources('resources.rc',
|
|
|
|
args: libui_manifest_args,
|
|
|
|
depend_files: [libui_test_manifest]),
|
|
|
|
]
|
2019-04-23 21:49:28 -05:00
|
|
|
if libui_mode != 'static'
|
|
|
|
libui_test_deps += [
|
|
|
|
# for QueryPerformanceCounter()/QueryPerformanceFrequency()
|
|
|
|
meson.get_compiler('c').find_library('kernel32',
|
|
|
|
required: true),
|
|
|
|
]
|
|
|
|
endif
|
2019-04-21 16:59:29 -05:00
|
|
|
endif
|
2019-04-10 13:42:17 -05:00
|
|
|
|
|
|
|
# TODO once we upgrade to 0.49.0, add pie: true
|
|
|
|
# TODO once we upgrade to 0.50.0, add protocol: 'exitcode'
|
|
|
|
libui_tester = executable('tester', libui_test_sources,
|
2019-04-23 21:49:28 -05:00
|
|
|
dependencies: libui_binary_deps + libui_test_deps,
|
2019-04-10 13:42:17 -05:00
|
|
|
link_with: libui_libui,
|
|
|
|
gui_app: false,
|
|
|
|
install: false)
|
|
|
|
test('test', libui_tester,
|
|
|
|
is_parallel: false,
|
|
|
|
should_fail: false)
|