2019-04-10 13:42:17 -05:00
|
|
|
# 23 march 2019
|
|
|
|
|
|
|
|
libui_test_sources = [
|
2019-06-15 19:38:18 -05:00
|
|
|
'controls.c',
|
|
|
|
'controls_errors.cpp',
|
2019-06-09 21:45:44 -05:00
|
|
|
'errors.c',
|
2019-05-18 12:26:55 -05:00
|
|
|
'events.c',
|
2019-06-15 18:58:46 -05:00
|
|
|
'events_errors.cpp',
|
2019-04-10 13:42:17 -05:00
|
|
|
'initmain.c',
|
2019-04-10 19:11:44 -05:00
|
|
|
'main.c',
|
2019-06-15 19:17:45 -05:00
|
|
|
'noinitwrongthread.cpp',
|
2019-04-10 13:42:17 -05:00
|
|
|
]
|
|
|
|
|
2019-06-10 22:09:35 -05:00
|
|
|
if libui_OS == 'windows'
|
|
|
|
libui_test_sources += [
|
|
|
|
'controls_windows.c',
|
2019-06-18 19:31:28 -05:00
|
|
|
'controls_windows_errors.cpp',
|
2019-06-10 22:09:35 -05:00
|
|
|
]
|
2019-06-11 20:23:56 -05:00
|
|
|
elif libui_OS == 'darwin'
|
2019-06-10 22:09:35 -05:00
|
|
|
libui_test_sources += [
|
2019-06-15 20:33:53 -05:00
|
|
|
'controls_darwin.m',
|
2019-06-16 20:26:05 -05:00
|
|
|
'controls_darwin_errors.m',
|
2019-06-10 22:09:35 -05:00
|
|
|
]
|
|
|
|
else
|
|
|
|
libui_test_sources += [
|
|
|
|
'controls_unix.c',
|
2019-06-18 19:19:32 -05:00
|
|
|
'controls_unix_errors.cpp',
|
2019-06-10 22:09:35 -05:00
|
|
|
]
|
|
|
|
endif
|
|
|
|
|
2019-06-15 19:06:12 -05:00
|
|
|
libui_test_cpp_extra_args = []
|
2019-05-04 20:47:04 -05:00
|
|
|
if libui_OS == 'windows'
|
|
|
|
libui_test_sources += [
|
2019-06-01 09:29:48 -05:00
|
|
|
windows.compile_resources('resources_' + libui_mode + '.rc',
|
2019-05-04 20:47:04 -05:00
|
|
|
args: libui_manifest_args,
|
2019-06-01 09:29:48 -05:00
|
|
|
depend_files: ['test_' + libui_mode + '.manifest']),
|
2019-05-04 20:47:04 -05:00
|
|
|
]
|
2019-06-15 19:06:12 -05:00
|
|
|
elif libui_OS == 'darwin'
|
|
|
|
# since we use a deployment target of 10.8, the non-C++11-compliant libstdc++ is chosen by default; we need C++11
|
|
|
|
# see issue #302 for more details
|
|
|
|
libui_test_cpp_extra_args += ['--stdlib=libc++']
|
2019-05-04 20:47:04 -05:00
|
|
|
endif
|
|
|
|
|
2019-05-04 15:53:54 -05:00
|
|
|
libui_test_deps = []
|
2019-04-22 22:01:55 -05:00
|
|
|
|
2019-05-04 15:53:54 -05:00
|
|
|
subdir('lib')
|
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,
|
2019-06-15 19:06:12 -05:00
|
|
|
cpp_args: libui_test_cpp_extra_args,
|
|
|
|
link_args: libui_test_cpp_extra_args,
|
2019-04-10 13:42:17 -05:00
|
|
|
gui_app: false,
|
|
|
|
install: false)
|
|
|
|
test('test', libui_tester,
|
|
|
|
is_parallel: false,
|
|
|
|
should_fail: false)
|