| 1 |
project('gui_app_test', 'c') |
| 2 |
|
| 3 |
# |
| 4 |
# test that linking a Windows console applications with the main function in a |
| 5 |
# library is correctly instructed which entrypoint function to look for |
| 6 |
# |
| 7 |
|
| 8 |
console_lib = static_library('main', 'console_prog.c') |
| 9 |
executable('console', 'dummy.c', link_with: console_lib, win_subsystem: 'console') |
| 10 |
executable('console2', 'dummy.c', link_with: console_lib, gui_app: false) |
| 11 |
|
| 12 |
# |
| 13 |
# also verify that the correct subsystem is set by executable(gui_app:) |
| 14 |
# |
| 15 |
|
| 16 |
gui_prog = executable('gui_prog', 'gui_prog.c', win_subsystem: 'windows,6.0') |
| 17 |
gui_prog2 = executable('gui_prog2', 'gui_prog.c', gui_app: true) |
| 18 |
console_prog = executable('console_prog', 'console_prog.c', win_subsystem: 'console') |
| 19 |
console_prog2 = executable('console_prog2', 'console_prog.c', gui_app: false) |
| 20 |
|
| 21 |
tester = find_program('gui_app_tester.py') |
| 22 |
|
| 23 |
test('is_gui', tester, args: [gui_prog, '2']) |
| 24 |
test('is_gui2', tester, args: [gui_prog2, '2']) |
| 25 |
test('not_gui', tester, args: [console_prog, '3']) |
| 26 |
test('not_gui2', tester, args: [console_prog2, '3']) |