build: add basic infra for building tests

This commit is contained in:
Andrei Alexeyev 2024-05-13 03:57:57 +02:00
parent 1914703edf
commit 0ea5f73c3c
No known key found for this signature in database
GPG key ID: 72D26128040B9690
3 changed files with 17 additions and 0 deletions

View file

@ -624,6 +624,7 @@ subdir('doc')
subdir('xdg')
subdir('atlas')
subdir('src')
subdir('test')
if macos_app_bundle
dmg_target = run_target('dmg',

View file

@ -219,3 +219,9 @@ option(
type : 'feature',
description: 'Integrate with the GameMode daemon, if running'
)
option(
'tests',
type : 'feature',
description : 'Build various test programs'
)

10
test/meson.build Normal file
View file

@ -0,0 +1,10 @@
opt_tests = get_option('tests'
).disable_auto_if(not is_developer_build
).require(have_libtaisei, error_message : 'Can not build tests for this platform')
if opt_tests.disabled()
subdir_done()
endif
test_incdir = include_directories('.')