##// END OF EJS Templates
Some Meson improvements, now declare dependency for each lib...
jeandet -
r662:831cc540a74a
parent child
Show More
@@ -1,39 +1,38
1 1
2 2 app_moc_headers = [
3 3 'include/MainWindow.h'
4 4 ]
5 5
6 6 app_ui_files = [
7 7 'ui/MainWindow.ui'
8 8 ]
9 9
10 10 app_qresources = ['resources/qlopapp.qrc']
11 11
12 12 app_moc_files = qt5.preprocess(moc_headers : app_moc_headers,
13 13 ui_files : app_ui_files,
14 14 qresources : app_qresources)
15 15
16 16 app_sources = [
17 17 'src/Main.cpp',
18 18 'src/MainWindow.cpp'
19 19 ]
20 20
21 21 app_inc = include_directories(['include'])
22 22
23 23 if host_machine.system()=='windows' or build_machine.system()=='windows'
24 24 winmod = import('windows')
25 25 rc = winmod.compile_resources('resources/qlopapp.rc')
26 26 else
27 27 rc = []
28 28 endif
29 29
30 30 sciqlop_app = executable('sciqlop',
31 31 app_sources,
32 32 app_moc_files,
33 33 rc,
34 link_with : [sciqlop_core, sciqlop_gui],
35 include_directories : [gui_inc, core_inc, app_inc],
36 dependencies : [qt5core, qt5printsupport, qt5gui, qt5widgets, qt5network],
34 include_directories : [ app_inc],
35 dependencies : [sciqlop_gui, sciqlop_core],
37 36 install : true
38 37 )
39 38
@@ -1,56 +1,62
1 1
2 2 core_moc_headers = [
3 3 'include/Data/IDataProvider.h',
4 4 'include/DataSource/DataSourceController.h',
5 5 'include/DataSource/DataSourceItemAction.h',
6 6 'include/Network/NetworkController.h',
7 7 'include/Time/TimeController.h',
8 8 'include/Variable/Variable.h',
9 9 'include/Variable/VariableCacheController.h',
10 10 'include/Variable/VariableController.h',
11 11 'include/Variable/VariableAcquisitionWorker.h',
12 12 'include/Variable/VariableCacheStrategy.h',
13 13 'include/Variable/VariableSynchronizationGroup.h',
14 14 'include/Variable/VariableModel.h',
15 15 'include/Visualization/VisualizationController.h'
16 16 ]
17 17
18 18
19 19 core_moc_files = qt5.preprocess(moc_headers : core_moc_headers)
20 20
21 21 core_sources = [
22 22 'src/Common/DateUtils.cpp',
23 23 'src/Data/ScalarSeries.cpp',
24 24 'src/Data/DataSeriesIterator.cpp',
25 25 'src/Data/ArrayDataIterator.cpp',
26 26 'src/Data/VectorSeries.cpp',
27 27 'src/DataSource/DataSourceController.cpp',
28 28 'src/DataSource/DataSourceItem.cpp',
29 29 'src/DataSource/DataSourceItemAction.cpp',
30 30 'src/Network/NetworkController.cpp',
31 31 'src/Plugin/PluginManager.cpp',
32 32 'src/Settings/SqpSettingsDefs.cpp',
33 33 'src/Time/TimeController.cpp',
34 34 'src/Variable/Variable.cpp',
35 35 'src/Variable/VariableCacheController.cpp',
36 36 'src/Variable/VariableController.cpp',
37 37 'src/Variable/VariableAcquisitionWorker.cpp',
38 38 'src/Variable/VariableCacheStrategy.cpp',
39 39 'src/Variable/VariableSynchronizationGroup.cpp',
40 40 'src/Variable/VariableModel.cpp',
41 41 'src/Visualization/VisualizationController.cpp'
42 42 ]
43 43
44 44 core_inc = include_directories(['include', '../plugin/include'])
45 45
46 sciqlop_core = library('sciqlopcore',
46 sciqlop_core_lib = library('sciqlopcore',
47 47 core_sources,
48 48 core_moc_files,
49 49 cpp_args : '-DCORE_LIB',
50 50 include_directories : core_inc,
51 dependencies : [qt5core, qt5widgets, qt5network],
51 dependencies : [qt5core, qt5network],
52 52 install : true
53 53 )
54 54
55
56 sciqlop_core = declare_dependency(link_with : sciqlop_core_lib,
57 include_directories : core_inc,
58 dependencies : [qt5core, qt5network])
59
60
55 61 subdir('tests')
56 62
@@ -1,20 +1,18
1 1
2 2
3 3 tests = [
4 4 [['Data/TestDataSeries.cpp'],'test_data','DataSeries test'],
5 5 [['Data/TestOneDimArrayData.cpp'],'test_1d','One Dim Array test'],
6 6 [['Data/TestTwoDimArrayData.cpp'],'test_2d','Two Dim Array test'],
7 7 [['DataSource/TestDataSourceController.cpp'],'test_data_source','DataSourceController test'],
8 8 [['Variable/TestVariableCacheController.cpp'],'test_variable_cache','VariableCacheController test'],
9 9 [['Variable/TestVariable.cpp'],'test_variable','Variable test']
10 10 ]
11 11
12 12 foreach unit_test : tests
13 13 test_moc_files = qt5.preprocess(moc_sources : unit_test[0])
14 14 test_exe = executable(unit_test[1],unit_test[0] , test_moc_files,
15 link_with : sciqlop_core,
16 include_directories : core_inc,
17 dependencies : [qt5core, qt5widgets, qt5network,qt5test])
15 dependencies : [sciqlop_core, qt5test])
18 16 test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])])
19 17 endforeach
20 18
@@ -1,72 +1,75
1 1
2 2 gui_moc_headers = [
3 3 'include/DataSource/DataSourceWidget.h',
4 4 'include/Settings/SqpSettingsDialog.h',
5 5 'include/Settings/SqpSettingsGeneralWidget.h',
6 6 'include/SidePane/SqpSidePane.h',
7 7 'include/SqpApplication.h',
8 8 'include/TimeWidget/TimeWidget.h',
9 9 'include/Variable/VariableInspectorWidget.h',
10 10 'include/Visualization/qcustomplot.h',
11 11 'include/Visualization/VisualizationGraphWidget.h',
12 12 'include/Visualization/VisualizationTabWidget.h',
13 13 'include/Visualization/VisualizationWidget.h',
14 14 'include/Visualization/VisualizationZoneWidget.h'
15 15 ]
16 16
17 17 gui_ui_files = [
18 18 'ui/DataSource/DataSourceWidget.ui',
19 19 'ui/Settings/SqpSettingsDialog.ui',
20 20 'ui/Settings/SqpSettingsGeneralWidget.ui',
21 21 'ui/SidePane/SqpSidePane.ui',
22 22 'ui/TimeWidget/TimeWidget.ui',
23 23 'ui/Variable/VariableInspectorWidget.ui',
24 24 'ui/Variable/VariableMenuHeaderWidget.ui',
25 25 'ui/Visualization/VisualizationGraphWidget.ui',
26 26 'ui/Visualization/VisualizationTabWidget.ui',
27 27 'ui/Visualization/VisualizationWidget.ui',
28 28 'ui/Visualization/VisualizationZoneWidget.ui'
29 29 ]
30 30
31 31 gui_qresources = ['resources/sqpguiresources.qrc']
32 32
33 33 gui_moc_files = qt5.preprocess(moc_headers : gui_moc_headers,
34 34 ui_files : gui_ui_files,
35 35 qresources : gui_qresources)
36 36
37 37 gui_sources = [
38 38 'src/SqpApplication.cpp',
39 39 'src/Common/ColorUtils.cpp',
40 40 'src/DataSource/DataSourceTreeWidgetItem.cpp',
41 41 'src/DataSource/DataSourceTreeWidgetHelper.cpp',
42 42 'src/DataSource/DataSourceWidget.cpp',
43 43 'src/Settings/SqpSettingsDialog.cpp',
44 44 'src/Settings/SqpSettingsGeneralWidget.cpp',
45 45 'src/SidePane/SqpSidePane.cpp',
46 46 'src/TimeWidget/TimeWidget.cpp',
47 47 'src/Variable/VariableInspectorWidget.cpp',
48 48 'src/Variable/VariableMenuHeaderWidget.cpp',
49 49 'src/Visualization/VisualizationGraphHelper.cpp',
50 50 'src/Visualization/VisualizationGraphRenderingDelegate.cpp',
51 51 'src/Visualization/VisualizationGraphWidget.cpp',
52 52 'src/Visualization/VisualizationTabWidget.cpp',
53 53 'src/Visualization/VisualizationWidget.cpp',
54 54 'src/Visualization/VisualizationZoneWidget.cpp',
55 55 'src/Visualization/qcustomplot.cpp',
56 56 'src/Visualization/operations/GenerateVariableMenuOperation.cpp',
57 57 'src/Visualization/operations/MenuBuilder.cpp',
58 58 'src/Visualization/operations/RemoveVariableOperation.cpp',
59 59 'src/Visualization/operations/RescaleAxeOperation.cpp'
60 60 ]
61 61
62 62 gui_inc = include_directories(['include'])
63 63
64 sciqlop_gui = library('sciqlopgui',
64 sciqlop_gui_lib = library('sciqlopgui',
65 65 gui_sources,
66 66 gui_moc_files,
67 link_with : sciqlop_core,
68 include_directories : [gui_inc, core_inc],
69 dependencies : [qt5core, qt5printsupport, qt5gui, qt5widgets, qt5network],
67 include_directories : [gui_inc],
68 dependencies : [ qt5printsupport, qt5gui, qt5widgets, qt5svg, sciqlop_core],
70 69 install : true
71 70 )
72 71
72 sciqlop_gui = declare_dependency(link_with : sciqlop_gui_lib,
73 include_directories : gui_inc,
74 dependencies : [qt5printsupport, qt5gui, qt5widgets, qt5svg, sciqlop_core])
75
@@ -1,73 +1,72
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 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 29 rcc_gen = generator(rcc,
30 30 output : 'qrc_@BASENAME@.cpp',
31 31 arguments : ['--name=@BASENAME@"',
32 32 '--output',
33 33 '@OUTPUT@',
34 34 '@INPUT@'])
35 35
36 36 amdaplugin_moc_plugin_files = moc_gen.process(amdaplugin_moc_headers)
37 37
38 38 amdaplugin_rcc_plugin_files = rcc_gen.process(amdaplugin_resources_files)
39 39
40 40 #amdaplugin_rcc_plugin_files = qt5.preprocess(
41 41 # qresources : amdaplugin_resources_files)
42 42
43 43 amdaplugin_moc_files = qt5.preprocess(
44 44 ui_files : amdaplugin_ui_files)
45 45
46 46 sciqlop_amdaplugin = library('amdaplugin',
47 47 amdaplugin_sources,
48 48 amdaplugin_moc_files,
49 49 amdaplugin_rcc_plugin_files,
50 50 amdaplugin_moc_plugin_files,
51 51 cpp_args : ['-DAMDA_LIB','-DQT_PLUGIN'],
52 link_with : [sciqlop_core, sciqlop_gui],
53 include_directories : [amdaplugin_inc, core_inc, gui_inc],
54 dependencies : [qt5core, qt5gui, qt5widgets, qt5network],
52 include_directories : [amdaplugin_inc],
53 dependencies : [sciqlop_core, sciqlop_gui],
55 54 install : true
56 55 )
57 56
58 57
59 58 tests = [
60 59 [['tests/TestAmdaParser.cpp'],'test_amda_parser','AMDA parser test'],
61 60 [['tests/TestAmdaResultParser.cpp'],'test_amda_result_parser','AMDA result parser test'],
62 61 [['tests/TestAmdaAcquisition.cpp'],'test_amda_acquisition','AMDA Acquisition test']
63 62 ]
64 63
65 64 foreach unit_test : tests
66 65 test_moc_files = qt5.preprocess(moc_sources : unit_test[0])
67 66 test_exe = executable(unit_test[1],unit_test[0] , test_moc_files,
68 link_with : [sciqlop_core, sciqlop_amdaplugin, sciqlop_gui],
69 include_directories : [core_inc, amdaplugin_inc, gui_inc],
67 link_with : [sciqlop_amdaplugin],
68 include_directories : [amdaplugin_inc],
70 69 cpp_args : ['-DAMDA_TESTS_RESOURCES_DIR="'+meson.current_source_dir()+'/tests-resources"'],
71 dependencies : [qt5core, qt5widgets, qt5network,qt5test])
70 dependencies : [sciqlop_core, sciqlop_gui, qt5test])
72 71 test(unit_test[2], test_exe, args: ['-teamcity', '-o', '@0@.teamcity.txt'.format(unit_test[1])], timeout: 3 * 60)
73 72 endforeach
@@ -1,33 +1,32
1 1
2 2 mockplugin_moc_headers = [
3 3 'include/MockPlugin.h'
4 4 ]
5 5
6 6 mockplugin_sources = [
7 7 'src/CosinusProvider.cpp',
8 8 'src/MockPlugin.cpp'
9 9 ]
10 10
11 11 mockplugin_inc = include_directories(['include', '../../plugin/include'])
12 12
13 13
14 14 gen = generator(moc,
15 15 output : 'moc_@BASENAME@.cpp',
16 16 arguments : ['@INPUT@',
17 17 '-DPLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/mockplugin/resources/mockplugin.json"',
18 18 '-I', meson.current_source_dir()+'/include',
19 19 '-I', meson.current_source_dir()+'/../../plugin/include',
20 20 '-o', '@OUTPUT@'])
21 21
22 22 mockplugin_moc_files = gen.process(mockplugin_moc_headers)
23 23
24 24 sciqlop_mockplugin = library('mockplugin',
25 25 mockplugin_sources,
26 26 mockplugin_moc_files,
27 27 cpp_args : '-DMOCKPLUGIN_LIB',
28 link_with : [sciqlop_core, sciqlop_gui],
29 include_directories : [mockplugin_inc, core_inc, gui_inc],
30 dependencies : [qt5core, qt5gui, qt5widgets, qt5network],
28 include_directories : [mockplugin_inc],
29 dependencies : [sciqlop_core, sciqlop_gui],
31 30 install : true
32 31 )
33 32
General Comments 0
You need to be logged in to leave comments. Login now