@@ -1,35 +1,36 | |||
|
1 | 1 | project('SciQLOP', 'cpp',default_options : ['cpp_std=c++14']) |
|
2 | 2 | |
|
3 | 3 | qt5 = import('qt5') |
|
4 | 4 | qt5core = dependency('qt5', modules : 'Core') |
|
5 | 5 | qt5widgets = dependency('qt5', modules : 'Widgets') |
|
6 | 6 | qt5gui = dependency('qt5', modules : 'Gui') |
|
7 | 7 | qt5svg = dependency('qt5', modules : 'Svg') |
|
8 | 8 | qt5xml = dependency('qt5', modules : 'Xml') |
|
9 | 9 | qt5network = dependency('qt5', modules : 'Network') |
|
10 | 10 | qt5printsupport = dependency('qt5', modules : 'PrintSupport') |
|
11 | 11 | qt5test = dependency('qt5', modules : 'Test') |
|
12 | 12 | |
|
13 |
moc = find_program('moc','moc |
|
|
13 | moc = find_program('moc-qt5','moc') | |
|
14 | rcc = find_program('rcc-qt5','rcc') | |
|
14 | 15 | |
|
15 | 16 | subdir('core') |
|
16 | 17 | subdir('gui') |
|
17 | 18 | subdir('app') |
|
18 | 19 | subdir('plugins') |
|
19 | 20 | |
|
20 | 21 | if build_machine.system()=='darwin' |
|
21 | 22 | install_data('build_cfg/mac/sciqlopLOGO.icns', install_dir : 'Contents/Resources') |
|
22 | 23 | install_data('build_cfg/mac/Info.plist', install_dir : 'Contents') |
|
23 | 24 | meson.add_install_script('build_cfg/mac/install_script.sh') |
|
24 | 25 | elif host_machine.system()=='windows' |
|
25 | 26 | meson.add_install_script('build_cfg/windows/install_script.sh') |
|
26 | 27 | endif |
|
27 | 28 | |
|
28 | 29 | cppcheck = find_program('cppcheck', required : false) |
|
29 | 30 | |
|
30 | 31 | if cppcheck.found() |
|
31 | 32 | run_target('cppcheck', |
|
32 | 33 | command : [cppcheck, '--enable=all', |
|
33 | 34 | '--project=' + join_paths(meson.build_root(), 'compile_commands.json')] |
|
34 | 35 | ) |
|
35 | 36 | endif |
@@ -1,61 +1,70 | |||
|
1 | 1 | |
|
2 | 2 | amdaplugin_moc_headers = [ |
|
3 | 3 | 'include/AmdaPlugin.h' |
|
4 | 4 | ] |
|
5 | 5 | |
|
6 | 6 | amdaplugin_sources = [ |
|
7 | 7 | 'src/AmdaDefs.cpp', |
|
8 | 8 | 'src/AmdaParser.cpp', |
|
9 | 9 | 'src/AmdaPlugin.cpp', |
|
10 | 10 | 'src/AmdaProvider.cpp', |
|
11 | 11 | 'src/AmdaResultParser.cpp' |
|
12 | 12 | ] |
|
13 | 13 | |
|
14 | 14 | amdaplugin_ui_files = [] |
|
15 | 15 | amdaplugin_resources_files = [ |
|
16 | 16 | 'resources/amdaresources.qrc' |
|
17 | 17 | ] |
|
18 | 18 | |
|
19 | 19 | amdaplugin_inc = include_directories(['include', '../../plugin/include']) |
|
20 | 20 | |
|
21 | gen = generator(moc, | |
|
21 | moc_gen = generator(moc, | |
|
22 | 22 | output : 'moc_@BASENAME@.cpp', |
|
23 | 23 | arguments : ['@INPUT@', |
|
24 | 24 | '-DPLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/amda/resources/amda.json"', |
|
25 | 25 | '-I', meson.current_source_dir()+'/include', |
|
26 | 26 | '-I', meson.current_source_dir()+'/../../plugin/include', |
|
27 | 27 | '-o', '@OUTPUT@']) |
|
28 | 28 | |
|
29 | amdaplugin_moc_plugin_files = gen.process(amdaplugin_moc_headers) | |
|
29 | rcc_gen = generator(rcc, | |
|
30 | output : 'qrc_@BASENAME@.cpp', | |
|
31 | arguments : ['--name=@BASENAME@"', | |
|
32 | '--output', | |
|
33 | '@OUTPUT@', | |
|
34 | '@INPUT@']) | |
|
35 | ||
|
36 | amdaplugin_moc_plugin_files = moc_gen.process(amdaplugin_moc_headers) | |
|
37 | ||
|
38 | amdaplugin_rcc_plugin_files = rcc_gen.process(amdaplugin_resources_files) | |
|
30 | 39 | |
|
31 | 40 | amdaplugin_moc_files = qt5.preprocess( |
|
32 |
ui_files : amdaplugin_ui_files |
|
|
33 | qresources : amdaplugin_resources_files) | |
|
41 | ui_files : amdaplugin_ui_files) | |
|
34 | 42 | |
|
35 | 43 | sciqlop_amdaplugin = library('amdaplugin', |
|
36 | 44 | amdaplugin_sources, |
|
37 | 45 | amdaplugin_moc_files, |
|
46 | amdaplugin_rcc_plugin_files, | |
|
38 | 47 | amdaplugin_moc_plugin_files, |
|
39 | 48 | cpp_args : '-DAMDA_LIB', |
|
40 | 49 | link_with : [sciqlop_core, sciqlop_gui], |
|
41 | 50 | include_directories : [amdaplugin_inc, core_inc, gui_inc], |
|
42 | 51 | dependencies : [qt5core, qt5gui, qt5widgets, qt5network], |
|
43 | 52 | install : true |
|
44 | 53 | ) |
|
45 | 54 | |
|
46 | 55 | |
|
47 | 56 | tests = [ |
|
48 | 57 | [['tests/TestAmdaParser.cpp'],'test_amda_parser','AMDA parser test'], |
|
49 | 58 | [['tests/TestAmdaResultParser.cpp'],'test_amda_result_parser','AMDA result parser test'], |
|
50 | 59 | [['tests/TestAmdaAcquisition.cpp'],'test_amda_acquisition','AMDA Acquisition test'] |
|
51 | 60 | ] |
|
52 | 61 | |
|
53 | 62 | foreach unit_test : tests |
|
54 | 63 | test_moc_files = qt5.preprocess(moc_sources : unit_test[0]) |
|
55 | 64 | test_exe = executable(unit_test[1],unit_test[0] , test_moc_files, |
|
56 | 65 | link_with : [sciqlop_core, sciqlop_amdaplugin, sciqlop_gui], |
|
57 | 66 | include_directories : [core_inc, amdaplugin_inc, gui_inc], |
|
58 | 67 | cpp_args : ['-DAMDA_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'], |
|
59 | 68 | dependencies : [qt5core, qt5widgets, qt5network,qt5test]) |
|
60 | 69 | test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60) |
|
61 | 70 | endforeach |
General Comments 0
You need to be logged in to leave comments.
Login now