meson.build
75 lines
| 2.7 KiB
| text/plain
|
TextLexer
r620 | ||||
amdaplugin_moc_headers = [ | ||||
r766 | 'include/AmdaPlugin.h', | |||
'include/AmdaProvider.h' | ||||
r620 | ] | |||
amdaplugin_sources = [ | ||||
'src/AmdaDefs.cpp', | ||||
'src/AmdaParser.cpp', | ||||
'src/AmdaPlugin.cpp', | ||||
'src/AmdaProvider.cpp', | ||||
'src/AmdaResultParser.cpp' | ||||
Alexandre Leroux
|
r946 | 'src/AmdaResultParserDefs.cpp' | ||
Alexandre Leroux
|
r945 | 'src/AmdaResultParserHelper.cpp' | ||
r620 | ] | |||
amdaplugin_ui_files = [] | ||||
amdaplugin_resources_files = [ | ||||
'resources/amdaresources.qrc' | ||||
] | ||||
amdaplugin_inc = include_directories(['include', '../../plugin/include']) | ||||
r651 | moc_gen = generator(moc, | |||
r620 | output : 'moc_@BASENAME@.cpp', | |||
arguments : ['@INPUT@', | ||||
'-DPLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/amda/resources/amda.json"', | ||||
'-I', meson.current_source_dir()+'/include', | ||||
'-I', meson.current_source_dir()+'/../../plugin/include', | ||||
'-o', '@OUTPUT@']) | ||||
r651 | rcc_gen = generator(rcc, | |||
output : 'qrc_@BASENAME@.cpp', | ||||
arguments : ['--name=@BASENAME@"', | ||||
'--output', | ||||
'@OUTPUT@', | ||||
'@INPUT@']) | ||||
amdaplugin_moc_plugin_files = moc_gen.process(amdaplugin_moc_headers) | ||||
amdaplugin_rcc_plugin_files = rcc_gen.process(amdaplugin_resources_files) | ||||
r620 | ||||
r652 | #amdaplugin_rcc_plugin_files = qt5.preprocess( | |||
# qresources : amdaplugin_resources_files) | ||||
r620 | amdaplugin_moc_files = qt5.preprocess( | |||
r651 | ui_files : amdaplugin_ui_files) | |||
r620 | ||||
sciqlop_amdaplugin = library('amdaplugin', | ||||
amdaplugin_sources, | ||||
amdaplugin_moc_files, | ||||
r651 | amdaplugin_rcc_plugin_files, | |||
r620 | amdaplugin_moc_plugin_files, | |||
r652 | cpp_args : ['-DAMDA_LIB','-DQT_PLUGIN'], | |||
r662 | include_directories : [amdaplugin_inc], | |||
dependencies : [sciqlop_core, sciqlop_gui], | ||||
r620 | install : true | |||
) | ||||
tests = [ | ||||
r633 | [['tests/TestAmdaParser.cpp'],'test_amda_parser','AMDA parser test'], | |||
[['tests/TestAmdaResultParser.cpp'],'test_amda_result_parser','AMDA result parser test'], | ||||
[['tests/TestAmdaAcquisition.cpp'],'test_amda_acquisition','AMDA Acquisition test'] | ||||
r620 | ] | |||
foreach unit_test : tests | ||||
test_moc_files = qt5.preprocess(moc_sources : unit_test[0]) | ||||
test_exe = executable(unit_test[1],unit_test[0] , test_moc_files, | ||||
r662 | link_with : [sciqlop_amdaplugin], | |||
include_directories : [amdaplugin_inc], | ||||
r620 | cpp_args : ['-DAMDA_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'], | |||
r662 | dependencies : [sciqlop_core, sciqlop_gui, qt5test]) | |||
r633 | test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60) | |||
r620 | endforeach | |||