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