@@ -1,38 +1,45 | |||||
1 |
|
1 | |||
2 | app_moc_headers = [ |
|
2 | app_moc_headers = [ | |
3 | 'include/MainWindow.h' |
|
3 | 'include/MainWindow.h' | |
4 | ] |
|
4 | ] | |
5 |
|
5 | |||
6 | app_ui_files = [ |
|
6 | app_ui_files = [ | |
7 | 'ui/MainWindow.ui' |
|
7 | 'ui/MainWindow.ui' | |
8 | ] |
|
8 | ] | |
9 |
|
9 | |||
10 | app_qresources = ['resources/qlopapp.qrc'] |
|
10 | app_qresources = ['resources/qlopapp.qrc'] | |
11 |
|
11 | |||
12 | app_moc_files = qt5.preprocess(moc_headers : app_moc_headers, |
|
12 | app_moc_files = qt5.preprocess(moc_headers : app_moc_headers, | |
13 | ui_files : app_ui_files, |
|
13 | ui_files : app_ui_files, | |
14 | qresources : app_qresources) |
|
14 | qresources : app_qresources) | |
15 |
|
15 | |||
16 | app_sources = [ |
|
16 | app_sources = [ | |
17 | 'src/Main.cpp', |
|
17 | 'src/Main.cpp', | |
18 | 'src/MainWindow.cpp' |
|
18 | 'src/MainWindow.cpp' | |
19 | ] |
|
19 | ] | |
20 |
|
20 | |||
21 | app_inc = include_directories(['include']) |
|
21 | app_inc = include_directories(['include']) | |
22 |
|
22 | |||
23 | if host_machine.system()=='windows' or build_machine.system()=='windows' |
|
23 | if host_machine.system()=='windows' or build_machine.system()=='windows' | |
24 | winmod = import('windows') |
|
24 | winmod = import('windows') | |
25 | rc = winmod.compile_resources('resources/qlopapp.rc') |
|
25 | rc = winmod.compile_resources('resources/qlopapp.rc') | |
26 | else |
|
26 | else | |
27 | rc = [] |
|
27 | rc = [] | |
28 | endif |
|
28 | endif | |
29 |
|
29 | |||
|
30 | app_libs = [] | |||
|
31 | ||||
|
32 | if 'static' == get_option('default_library') | |||
|
33 | app_libs = [ sciqlop_amdaplugin, sciqlop_mockplugin] | |||
|
34 | endif | |||
|
35 | ||||
30 | sciqlop_app = executable('sciqlop', |
|
36 | sciqlop_app = executable('sciqlop', | |
31 | app_sources, |
|
37 | app_sources, | |
32 | app_moc_files, |
|
38 | app_moc_files, | |
33 | rc, |
|
39 | rc, | |
34 | include_directories : [ app_inc], |
|
40 | include_directories : [ app_inc], | |
|
41 | link_with: app_libs, | |||
35 | dependencies : [sciqlop_gui, sciqlop_core], |
|
42 | dependencies : [sciqlop_gui, sciqlop_core], | |
36 | install : true |
|
43 | install : true | |
37 | ) |
|
44 | ) | |
38 |
|
45 |
@@ -1,8 +1,8 | |||||
1 | #!/bin/bash |
|
1 | #!/bin/bash | |
2 |
|
2 | |||
3 | mkdir build |
|
3 | mkdir build | |
4 | meson --prefix=/tmp/SciQLOP.app --bindir=Contents/MacOS build |
|
4 | meson -Dcpp_args='-DQT_STATICPLUGIN' -Ddefault_library=static --prefix=/tmp/SciQLOP.app --bindir=Contents/MacOS build | |
5 | cd build |
|
5 | cd build | |
6 | ninja |
|
6 | ninja | |
7 | ninja install |
|
7 | ninja install | |
8 |
|
8 |
@@ -1,50 +1,50 | |||||
1 | project('SciQLOP', 'cpp',default_options : ['cpp_std=c++17'], meson_version:'>=0.47.0') |
|
1 | project('SciQLOP', 'cpp',default_options : ['cpp_std=c++17'], meson_version:'>=0.47.0') | |
2 |
|
2 | |||
3 | qt5 = import('qt5') |
|
3 | qt5 = import('qt5') | |
4 | qt5core = dependency('qt5', modules : 'Core') |
|
4 | qt5core = dependency('qt5', modules : 'Core') | |
5 | qt5widgets = dependency('qt5', modules : 'Widgets') |
|
5 | qt5widgets = dependency('qt5', modules : 'Widgets') | |
6 | qt5gui = dependency('qt5', modules : 'Gui') |
|
6 | qt5gui = dependency('qt5', modules : 'Gui') | |
7 | qt5svg = dependency('qt5', modules : 'Svg') |
|
7 | qt5svg = dependency('qt5', modules : 'Svg') | |
8 | qt5xml = dependency('qt5', modules : 'Xml') |
|
8 | qt5xml = dependency('qt5', modules : 'Xml') | |
9 | qt5network = dependency('qt5', modules : 'Network') |
|
9 | qt5network = dependency('qt5', modules : 'Network') | |
10 | qt5printsupport = dependency('qt5', modules : 'PrintSupport') |
|
10 | qt5printsupport = dependency('qt5', modules : 'PrintSupport') | |
11 | qt5Concurrent = dependency('qt5', modules : 'Concurrent') |
|
11 | qt5Concurrent = dependency('qt5', modules : 'Concurrent') | |
12 | qt5test = dependency('qt5', modules : 'Test') |
|
12 | qt5test = dependency('qt5', modules : 'Test') | |
13 |
|
13 | |||
14 | moc = find_program('moc-qt5','moc') |
|
14 | moc = find_program('moc-qt5','moc') | |
15 | rcc = find_program('rcc-qt5','rcc') |
|
15 | rcc = find_program('rcc-qt5','rcc') | |
16 |
|
16 | |||
17 | if build_machine.system()=='darwin' |
|
17 | if build_machine.system()=='darwin' | |
18 | add_global_link_arguments('-headerpad_max_install_names', language : 'cpp') |
|
18 | add_global_link_arguments('-headerpad_max_install_names', language : 'cpp') | |
19 | install_data('build_cfg/mac/sciqlopLOGO.icns', install_dir : 'Contents/Resources') |
|
19 | install_data('build_cfg/mac/sciqlopLOGO.icns', install_dir : 'Contents/Resources') | |
20 | install_data('build_cfg/mac/Info.plist', install_dir : 'Contents') |
|
20 | install_data('build_cfg/mac/Info.plist', install_dir : 'Contents') | |
21 | meson.add_install_script('build_cfg/mac/install_script.sh') |
|
21 | meson.add_install_script('build_cfg/mac/install_script.sh') | |
22 | elif host_machine.system()=='windows' |
|
22 | elif host_machine.system()=='windows' | |
23 | meson.add_install_script('build_cfg/windows/install_script.sh') |
|
23 | meson.add_install_script('build_cfg/windows/install_script.sh') | |
24 | elif host_machine.system()=='linux' |
|
24 | elif host_machine.system()=='linux' | |
25 | install_data('app/resources/sciqlopLOGO.svg', install_dir : 'share/icons/hicolor/scalable/') |
|
25 | install_data('app/resources/sciqlopLOGO.svg', install_dir : 'share/icons/hicolor/scalable/') | |
26 | install_data('app/resources/SciQLOP.desktop', install_dir : 'share/applications') |
|
26 | install_data('app/resources/SciQLOP.desktop', install_dir : 'share/applications') | |
27 | endif |
|
27 | endif | |
28 |
|
28 | |||
29 | # Sets AMDA server that will be used during execution. |
|
29 | # Sets AMDA server that will be used during execution. | |
30 | # Available values are: |
|
30 | # Available values are: | |
31 | # - "default": default AMDA server |
|
31 | # - "default": default AMDA server | |
32 | # - "amdatest": AMDA test server |
|
32 | # - "amdatest": AMDA test server | |
33 | # - "hybrid": use both the default server and the test server (the server used is relative to each product, according to its "server" property in the JSON file) |
|
33 | # - "hybrid": use both the default server and the test server (the server used is relative to each product, according to its "server" property in the JSON file) | |
34 | # - "localhost": use local AMDA server |
|
34 | # - "localhost": use local AMDA server | |
35 | # Any other value will lead to the use of the default server |
|
35 | # Any other value will lead to the use of the default server | |
36 | add_project_arguments('-DSCIQLOP_AMDA_SERVER="hybrid"', language : 'cpp') |
|
36 | add_project_arguments('-DSCIQLOP_AMDA_SERVER="hybrid"', language : 'cpp') | |
37 |
|
37 | |||
38 | subdir('core') |
|
38 | subdir('core') | |
39 | subdir('gui') |
|
39 | subdir('gui') | |
40 | subdir('app') |
|
|||
41 | subdir('plugins') |
|
40 | subdir('plugins') | |
|
41 | subdir('app') | |||
42 |
|
42 | |||
43 | cppcheck = find_program('cppcheck', required : false) |
|
43 | cppcheck = find_program('cppcheck', required : false) | |
44 |
|
44 | |||
45 | if cppcheck.found() |
|
45 | if cppcheck.found() | |
46 | run_target('cppcheck', |
|
46 | run_target('cppcheck', | |
47 | command : [cppcheck, '--enable=all', |
|
47 | command : [cppcheck, '--enable=all', | |
48 | '--project=' + join_paths(meson.build_root(), 'compile_commands.json')] |
|
48 | '--project=' + join_paths(meson.build_root(), 'compile_commands.json')] | |
49 | ) |
|
49 | ) | |
50 | endif |
|
50 | endif |
@@ -1,89 +1,70 | |||||
1 |
|
1 | |||
2 | amdaplugin_moc_headers = [ |
|
2 | amdaplugin_moc_headers = [ | |
3 | 'include/AmdaPlugin.h', |
|
3 | 'include/AmdaPlugin.h', | |
4 | 'include/AmdaProvider.h' |
|
4 | 'include/AmdaProvider.h' | |
5 | ] |
|
5 | ] | |
6 |
|
6 | |||
7 | amdaplugin_sources = [ |
|
7 | amdaplugin_sources = [ | |
8 | 'src/AmdaDefs.cpp', |
|
8 | 'src/AmdaDefs.cpp', | |
9 | 'src/AmdaParser.cpp', |
|
9 | 'src/AmdaParser.cpp', | |
10 | 'src/AmdaPlugin.cpp', |
|
10 | 'src/AmdaPlugin.cpp', | |
11 | 'src/AmdaProvider.cpp', |
|
11 | 'src/AmdaProvider.cpp', | |
12 | 'src/AmdaResultParser.cpp', |
|
12 | 'src/AmdaResultParser.cpp', | |
13 | 'src/AmdaResultParserDefs.cpp', |
|
13 | 'src/AmdaResultParserDefs.cpp', | |
14 | 'src/AmdaResultParserHelper.cpp', |
|
14 | 'src/AmdaResultParserHelper.cpp', | |
15 | 'src/AmdaServer.cpp' |
|
15 | 'src/AmdaServer.cpp' | |
16 | ] |
|
16 | ] | |
17 |
|
17 | |||
18 | amdaplugin_ui_files = [] |
|
18 | amdaplugin_ui_files = [] | |
19 | amdaplugin_resources_files = [ |
|
19 | amdaplugin_resources_files = [ | |
20 | 'resources/amdaresources.qrc' |
|
20 | 'resources/amdaresources.qrc' | |
21 | ] |
|
21 | ] | |
22 |
|
22 | |||
23 | amdaplugin_inc = include_directories(['include']) |
|
23 | amdaplugin_inc = include_directories(['include']) | |
24 |
|
24 | |||
25 | moc_gen = generator(moc, |
|
25 | amdaplugin_prep_files = qt5.preprocess(moc_headers : amdaplugin_moc_headers, | |
26 | output : 'moc_@BASENAME@.cpp', |
|
26 | moc_extra_arguments: ['-DSCIQLOP_PLUGIN_JSON_FILE_PATH="'+ | |
27 | arguments : ['@INPUT@', |
|
27 | meson.source_root()+ | |
28 | '-DSCIQLOP_PLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/amda/resources/amda.json"', |
|
28 | '/plugins/amda/resources/amda.json"'], | |
29 | '-I', meson.current_source_dir()+'/include', |
|
29 | include_directories: [amdaplugin_inc, core_inc], | |
30 | '-I', meson.current_source_dir()+'/../../core/include/', |
|
30 | qresources : amdaplugin_resources_files, | |
31 | '-o', '@OUTPUT@']) |
|
31 | ui_files : amdaplugin_ui_files) | |
32 |
|
||||
33 | rcc_gen = generator(rcc, |
|
|||
34 | output : 'qrc_@BASENAME@.cpp', |
|
|||
35 | arguments : ['--name=@BASENAME@"', |
|
|||
36 | '--output', |
|
|||
37 | '@OUTPUT@', |
|
|||
38 | '@INPUT@']) |
|
|||
39 |
|
||||
40 | amdaplugin_moc_plugin_files = moc_gen.process(amdaplugin_moc_headers) |
|
|||
41 |
|
||||
42 | amdaplugin_rcc_plugin_files = rcc_gen.process(amdaplugin_resources_files) |
|
|||
43 |
|
||||
44 | #amdaplugin_rcc_plugin_files = qt5.preprocess( |
|
|||
45 | # qresources : amdaplugin_resources_files) |
|
|||
46 |
|
||||
47 | amdaplugin_moc_files = qt5.preprocess( |
|
|||
48 | ui_files : amdaplugin_ui_files) |
|
|||
49 |
|
32 | |||
50 | sciqlop_amdaplugin = library('amdaplugin', |
|
33 | sciqlop_amdaplugin = library('amdaplugin', | |
51 | amdaplugin_sources, |
|
34 | amdaplugin_sources, | |
52 |
amdaplugin_ |
|
35 | amdaplugin_prep_files, | |
53 | amdaplugin_rcc_plugin_files, |
|
|||
54 | amdaplugin_moc_plugin_files, |
|
|||
55 | cpp_args : ['-DAMDA_LIB','-DQT_PLUGIN'], |
|
36 | cpp_args : ['-DAMDA_LIB','-DQT_PLUGIN'], | |
56 | include_directories : [amdaplugin_inc], |
|
37 | include_directories : [amdaplugin_inc], | |
57 | dependencies : [sciqlop_core, sciqlop_gui], |
|
38 | dependencies : [sciqlop_core, sciqlop_gui], | |
58 | install : true |
|
39 | install : true | |
59 | ) |
|
40 | ) | |
60 |
|
41 | |||
61 |
|
42 | |||
62 | tests = [ |
|
43 | tests = [ | |
63 | [['tests/TestAmdaParser.cpp'],'test_amda_parser','AMDA parser test'], |
|
44 | [['tests/TestAmdaParser.cpp'],'test_amda_parser','AMDA parser test'], | |
64 | [['tests/TestAmdaResultParser.cpp'],'test_amda_result_parser','AMDA result parser test'], |
|
45 | [['tests/TestAmdaResultParser.cpp'],'test_amda_result_parser','AMDA result parser test'], | |
65 | [['tests/TestAmdaAcquisition.cpp'],'test_amda_acquisition','AMDA Acquisition test'], |
|
46 | [['tests/TestAmdaAcquisition.cpp'],'test_amda_acquisition','AMDA Acquisition test'], | |
66 | [['tests/TestAmdaFuzzing.cpp'],'test_amda_fuzzing','AMDA fuzzing test'] |
|
47 | [['tests/TestAmdaFuzzing.cpp'],'test_amda_fuzzing','AMDA fuzzing test'] | |
67 | ] |
|
48 | ] | |
68 |
|
49 | |||
69 | tests_sources = [ |
|
50 | tests_sources = [ | |
70 | 'tests/FuzzingDefs.h', |
|
51 | 'tests/FuzzingDefs.h', | |
71 | 'tests/FuzzingDefs.cpp', |
|
52 | 'tests/FuzzingDefs.cpp', | |
72 | 'tests/FuzzingOperations.h', |
|
53 | 'tests/FuzzingOperations.h', | |
73 | 'tests/FuzzingOperations.cpp', |
|
54 | 'tests/FuzzingOperations.cpp', | |
74 | 'tests/FuzzingUtils.h', |
|
55 | 'tests/FuzzingUtils.h', | |
75 | 'tests/FuzzingUtils.cpp', |
|
56 | 'tests/FuzzingUtils.cpp', | |
76 | 'tests/FuzzingValidators.h', |
|
57 | 'tests/FuzzingValidators.h', | |
77 | 'tests/FuzzingValidators.cpp' |
|
58 | 'tests/FuzzingValidators.cpp' | |
78 | ] |
|
59 | ] | |
79 |
|
60 | |||
80 | foreach unit_test : tests |
|
61 | foreach unit_test : tests | |
81 | test_moc_files = qt5.preprocess(moc_sources : unit_test[0]) |
|
62 | test_moc_files = qt5.preprocess(moc_sources : unit_test[0]) | |
82 | test_exe = executable(unit_test[1],unit_test[0] , test_moc_files, |
|
63 | test_exe = executable(unit_test[1],unit_test[0] , test_moc_files, | |
83 | link_with : [sciqlop_amdaplugin], |
|
64 | link_with : [sciqlop_amdaplugin], | |
84 | include_directories : [amdaplugin_inc], |
|
65 | include_directories : [amdaplugin_inc], | |
85 | cpp_args : ['-DAMDA_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'], |
|
66 | cpp_args : ['-DAMDA_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'], | |
86 | sources : [tests_sources], |
|
67 | sources : [tests_sources], | |
87 | dependencies : [sciqlop_core, sciqlop_gui, qt5test]) |
|
68 | dependencies : [sciqlop_core, sciqlop_gui, qt5test]) | |
88 | test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60) |
|
69 | test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60) | |
89 | endforeach |
|
70 | endforeach |
General Comments 0
You need to be logged in to leave comments.
Login now