diff options
| author | Aaron Small <a.small@unb.ca> | 2017-03-21 23:38:24 -0400 |
|---|---|---|
| committer | Aaron Small <a.small@unb.ca> | 2017-04-09 03:31:39 -0400 |
| commit | 76c8491d770d558d4140789e01a9cb74701600ff (patch) | |
| tree | bc55211a73dfc410bd811db6762373ebb32294d6 /test cases/frameworks | |
| parent | b89af8b6dd0efc97867be96e91630d8a1c4d3316 (diff) | |
| download | meson-76c8491d770d558d4140789e01a9cb74701600ff.tar.gz | |
Add an option to dependencies called 'method'. This can be used to
configure a detection method, for those types of dependencies that have
more than one means of detection.
The default detection methods are unchanged if 'method' is not
specified, and all dependencies support the method 'auto', which is the
same as not specifying a method.
The dependencies which do support multiple detection methods
additionally support other values, depending on the dependency.
Diffstat (limited to 'test cases/frameworks')
| -rw-r--r-- | test cases/frameworks/4 qt/meson.build | 14 | ||||
| -rw-r--r-- | test cases/frameworks/4 qt/meson_options.txt | 1 |
2 files changed, 9 insertions, 6 deletions
diff --git a/test cases/frameworks/4 qt/meson.build b/test cases/frameworks/4 qt/meson.build index fec5959b8..468b9c93b 100644 --- a/test cases/frameworks/4 qt/meson.build +++ b/test cases/frameworks/4 qt/meson.build @@ -9,17 +9,17 @@ foreach qt : ['qt4', 'qt5'] qt_modules += qt5_modules endif # Test that invalid modules are indeed not found - fakeqtdep = dependency(qt, modules : ['DefinitelyNotFound'], required : false) + fakeqtdep = dependency(qt, modules : ['DefinitelyNotFound'], required : false, method : get_option('method')) if fakeqtdep.found() error('Invalid qt dep incorrectly found!') endif # Test that partially-invalid modules are indeed not found - fakeqtdep = dependency(qt, modules : ['Core', 'DefinitelyNotFound'], required : false) + fakeqtdep = dependency(qt, modules : ['Core', 'DefinitelyNotFound'], required : false, method : get_option('method')) if fakeqtdep.found() error('Invalid qt dep incorrectly found!') endif # If qt4 modules are found, test that. qt5 is required. - qtdep = dependency(qt, modules : qt_modules, required : qt == 'qt5') + qtdep = dependency(qt, modules : qt_modules, required : qt == 'qt5', method : get_option('method')) if qtdep.found() qtmodule = import(qt) @@ -30,10 +30,11 @@ foreach qt : ['qt4', 'qt5'] moc_headers : ['mainWindow.h'], # These need to be fed through the moc tool before use. ui_files : 'mainWindow.ui', # XML files that need to be compiled with the uic tol. qresources : ['stuff.qrc', 'stuff2.qrc'], # Resource file for rcc compiler. + method : get_option('method') ) # Test that setting a unique name with a positional argument works - qtmodule.preprocess(qt + 'teststuff', qresources : ['stuff.qrc']) + qtmodule.preprocess(qt + 'teststuff', qresources : ['stuff.qrc'], method : get_option('method')) qexe = executable(qt + 'app', sources : ['main.cpp', 'mainWindow.cpp', # Sources that don't need preprocessing. @@ -43,7 +44,7 @@ foreach qt : ['qt4', 'qt5'] # We need a console test application because some test environments # do not have an X server. - qtcore = dependency(qt, modules : 'Core') + qtcore = dependency(qt, modules : 'Core', method : get_option('method')) qtcoreapp = executable(qt + 'core', 'q5core.cpp', dependencies : qtcore) @@ -55,7 +56,8 @@ foreach qt : ['qt4', 'qt5'] # files from sources. manpreprocessed = qtmodule.preprocess( moc_sources : 'manualinclude.cpp', - moc_headers : 'manualinclude.h') + moc_headers : 'manualinclude.h', + method : get_option('method')) qtmaninclude = executable(qt + 'maninclude', sources : ['manualinclude.cpp', manpreprocessed], diff --git a/test cases/frameworks/4 qt/meson_options.txt b/test cases/frameworks/4 qt/meson_options.txt new file mode 100644 index 000000000..bc1069ebc --- /dev/null +++ b/test cases/frameworks/4 qt/meson_options.txt @@ -0,0 +1 @@ +option('method', type : 'string', value : 'auto', description : 'The method to use to find Qt') |
