@@ -1,72 +1,73 | |||
|
1 | 1 | |
|
2 | 2 | amdaplugin_moc_headers = [ |
|
3 | 'include/AmdaPlugin.h' | |
|
3 | 'include/AmdaPlugin.h', | |
|
4 | 'include/AmdaProvider.h' | |
|
4 | 5 | ] |
|
5 | 6 | |
|
6 | 7 | amdaplugin_sources = [ |
|
7 | 8 | 'src/AmdaDefs.cpp', |
|
8 | 9 | 'src/AmdaParser.cpp', |
|
9 | 10 | 'src/AmdaPlugin.cpp', |
|
10 | 11 | 'src/AmdaProvider.cpp', |
|
11 | 12 | 'src/AmdaResultParser.cpp' |
|
12 | 13 | ] |
|
13 | 14 | |
|
14 | 15 | amdaplugin_ui_files = [] |
|
15 | 16 | amdaplugin_resources_files = [ |
|
16 | 17 | 'resources/amdaresources.qrc' |
|
17 | 18 | ] |
|
18 | 19 | |
|
19 | 20 | amdaplugin_inc = include_directories(['include', '../../plugin/include']) |
|
20 | 21 | |
|
21 | 22 | moc_gen = generator(moc, |
|
22 | 23 | output : 'moc_@BASENAME@.cpp', |
|
23 | 24 | arguments : ['@INPUT@', |
|
24 | 25 | '-DPLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/amda/resources/amda.json"', |
|
25 | 26 | '-I', meson.current_source_dir()+'/include', |
|
26 | 27 | '-I', meson.current_source_dir()+'/../../plugin/include', |
|
27 | 28 | '-o', '@OUTPUT@']) |
|
28 | 29 | |
|
29 | 30 | rcc_gen = generator(rcc, |
|
30 | 31 | output : 'qrc_@BASENAME@.cpp', |
|
31 | 32 | arguments : ['--name=@BASENAME@"', |
|
32 | 33 | '--output', |
|
33 | 34 | '@OUTPUT@', |
|
34 | 35 | '@INPUT@']) |
|
35 | 36 | |
|
36 | 37 | amdaplugin_moc_plugin_files = moc_gen.process(amdaplugin_moc_headers) |
|
37 | 38 | |
|
38 | 39 | amdaplugin_rcc_plugin_files = rcc_gen.process(amdaplugin_resources_files) |
|
39 | 40 | |
|
40 | 41 | #amdaplugin_rcc_plugin_files = qt5.preprocess( |
|
41 | 42 | # qresources : amdaplugin_resources_files) |
|
42 | 43 | |
|
43 | 44 | amdaplugin_moc_files = qt5.preprocess( |
|
44 | 45 | ui_files : amdaplugin_ui_files) |
|
45 | 46 | |
|
46 | 47 | sciqlop_amdaplugin = library('amdaplugin', |
|
47 | 48 | amdaplugin_sources, |
|
48 | 49 | amdaplugin_moc_files, |
|
49 | 50 | amdaplugin_rcc_plugin_files, |
|
50 | 51 | amdaplugin_moc_plugin_files, |
|
51 | 52 | cpp_args : ['-DAMDA_LIB','-DQT_PLUGIN'], |
|
52 | 53 | include_directories : [amdaplugin_inc], |
|
53 | 54 | dependencies : [sciqlop_core, sciqlop_gui], |
|
54 | 55 | install : true |
|
55 | 56 | ) |
|
56 | 57 | |
|
57 | 58 | |
|
58 | 59 | tests = [ |
|
59 | 60 | [['tests/TestAmdaParser.cpp'],'test_amda_parser','AMDA parser test'], |
|
60 | 61 | [['tests/TestAmdaResultParser.cpp'],'test_amda_result_parser','AMDA result parser test'], |
|
61 | 62 | [['tests/TestAmdaAcquisition.cpp'],'test_amda_acquisition','AMDA Acquisition test'] |
|
62 | 63 | ] |
|
63 | 64 | |
|
64 | 65 | foreach unit_test : tests |
|
65 | 66 | test_moc_files = qt5.preprocess(moc_sources : unit_test[0]) |
|
66 | 67 | test_exe = executable(unit_test[1],unit_test[0] , test_moc_files, |
|
67 | 68 | link_with : [sciqlop_amdaplugin], |
|
68 | 69 | include_directories : [amdaplugin_inc], |
|
69 | 70 | cpp_args : ['-DAMDA_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'], |
|
70 | 71 | dependencies : [sciqlop_core, sciqlop_gui, qt5test]) |
|
71 | 72 | test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60) |
|
72 | 73 | endforeach |
General Comments 0
You need to be logged in to leave comments.
Login now