@@ -1,46 +1,50 | |||
|
1 | 1 | shiboken2 = find_program('shiboken2') |
|
2 | 2 | qmake = find_program('qmake-qt5','qmake') |
|
3 | 3 | |
|
4 | 4 | pymod = import('python') |
|
5 | python3 = pymod.find_installation('python3', modules:['PySide2','shiboken2', 'shiboken2_generator']) | |
|
5 | python3 = pymod.find_installation('python3', modules:['PySide2','shiboken2', 'shiboken2_generator', 'numpy']) | |
|
6 | python3_dep = python3.dependency() | |
|
7 | numpy_inc = run_command(python3, '-c', 'import numpy;print(numpy.get_include())').stdout().strip('\n') | |
|
6 | 8 | |
|
7 | 9 | qt5_modules = ['QtCore','QtGui','QtWidgets'] |
|
8 | 10 | |
|
9 | 11 | qt_headers_path = run_command(qmake, '-query', 'QT_INSTALL_HEADERS').stdout().strip('\n') |
|
10 | 12 | generated_srcs = run_command(python3, 'src_list.py', 'meson').stdout().split(';') |
|
11 | 13 | |
|
12 | 14 | modules_arg = '--modules=@0@'.format(','.join(qt5_modules)) |
|
13 | 15 | |
|
14 | 16 | shiboken2_build_flags = run_command(python3, 'shiboken-helper.py', '--includes', modules_arg).stdout().strip('\n').split(' ') |
|
15 | 17 | shiboken2_link_flags = run_command(python3, 'shiboken-helper.py', '--libs', modules_arg).stdout().strip('\n').split(' ') |
|
16 | 18 | shiboken2_typesystem = run_command(python3, 'shiboken-helper.py', '--typesystem').stdout().strip('\n') |
|
17 | 19 | |
|
18 | 20 | sciqlop_bindings_incs = shiboken2_build_flags + [ |
|
19 | 21 | '-I'+meson.current_source_dir()+'/../../gui/include', |
|
20 | 22 | '-I'+meson.current_source_dir()+'/../../core/include', |
|
21 | 23 | '-I'+meson.current_source_dir()+'/../../subprojects/TimeSeries/include', |
|
22 | 24 | '-I'+meson.current_source_dir()+'/../../subprojects/cpp_utils/include', |
|
23 | 25 | '-I'+python3.get_path('include'), |
|
24 | '-I'+qt_headers_path | |
|
26 | '-I'+qt_headers_path, | |
|
27 | '-I'+numpy_inc | |
|
25 | 28 | ] |
|
26 | 29 | |
|
27 | 30 | foreach mod:qt5_modules |
|
28 | 31 | sciqlop_bindings_incs += ['-I'+qt_headers_path+'/'+mod] |
|
29 | 32 | endforeach |
|
30 | 33 | |
|
31 | 34 | |
|
32 | 35 | sciqlop_bindings_src = files('bindings.h', 'PyDataProvider.h', 'numpy_wrappers.h', 'numpy_wrappers.cpp') |
|
33 | 36 | |
|
34 | 37 | subdir('SciQLopBindings') |
|
35 | 38 | subdir('plugins') |
|
36 | 39 | |
|
37 | 40 | shiboken_dep = declare_dependency(compile_args: shiboken2_build_flags, link_args: shiboken2_link_flags) |
|
38 | 41 | |
|
39 | 42 | sciqlop_bindings = python3.extension_module('SciQLopBindings',sciqlop_bindings_src,shiboken2_generator_out, |
|
40 |
dependencies : [sciqlop_app_dep, python3 |
|
|
43 | dependencies : [sciqlop_app_dep, python3_dep, shiboken_dep, cpp_utils_dep], | |
|
44 | include_directories : numpy_inc | |
|
41 | 45 | ) |
|
42 | 46 | |
|
43 | 47 | |
|
44 | 48 | configure_file(input:'main.py', output:'main.py', copy:true) |
|
45 | 49 | |
|
46 | 50 | executable('sciqlop', 'main.cpp', dependencies :python3.dependency()) |
@@ -1,54 +1,61 | |||
|
1 | project('SciQLOP', 'cpp',default_options : ['cpp_std=c++17'], meson_version:'>=0.51.0') | |
|
2 | add_global_arguments('-DSCIQLOP_VERSION="1.1.0"', language : 'cpp') | |
|
1 | project( | |
|
2 | 'SciQLOP', | |
|
3 | 'cpp', | |
|
4 | default_options : 'cpp_std=c++17', | |
|
5 | meson_version : '>=0.51.0', | |
|
6 | version : '1.1.0', | |
|
7 | license : 'GPL3' | |
|
8 | ) | |
|
9 | add_global_arguments('-DSCIQLOP_VERSION="@0@"'.format(meson.project_version()), language : 'cpp') | |
|
3 | 10 | |
|
4 | 11 | qt5 = import('qt5') |
|
5 | 12 | qt5core = dependency('qt5', modules : 'Core') |
|
6 | 13 | qt5widgets = dependency('qt5', modules : 'Widgets') |
|
7 | 14 | qt5gui = dependency('qt5', modules : 'Gui') |
|
8 | 15 | qt5svg = dependency('qt5', modules : 'Svg') |
|
9 | 16 | qt5xml = dependency('qt5', modules : 'Xml') |
|
10 | 17 | qt5network = dependency('qt5', modules : 'Network') |
|
11 | 18 | qt5printsupport = dependency('qt5', modules : 'PrintSupport') |
|
12 | 19 | qt5Concurrent = dependency('qt5', modules : 'Concurrent') |
|
13 | 20 | qt5test = dependency('qt5', modules : 'Test') |
|
14 | 21 | |
|
15 | 22 | cpp_utils_dep = dependency('cpp_utils', fallback:['cpp_utils','cpp_utils_dep']) |
|
16 | 23 | |
|
17 | 24 | moc = find_program('moc-qt5','moc') |
|
18 | 25 | rcc = find_program('rcc-qt5','rcc') |
|
19 | 26 | |
|
20 | 27 | if build_machine.system()=='darwin' |
|
21 | 28 | add_global_link_arguments('-headerpad_max_install_names', language : 'cpp') |
|
22 | 29 | install_data('build_cfg/mac/sciqlopLOGO.icns', install_dir : 'Contents/Resources') |
|
23 | 30 | install_data('build_cfg/mac/Info.plist', install_dir : 'Contents') |
|
24 | 31 | meson.add_install_script('build_cfg/mac/install_script.sh') |
|
25 | 32 | elif host_machine.system()=='windows' |
|
26 | 33 | meson.add_install_script('build_cfg/windows/install_script.sh') |
|
27 | 34 | elif host_machine.system()=='linux' |
|
28 | 35 | install_data('app/resources/sciqlopLOGO.svg', install_dir : 'share/icons/hicolor/scalable/') |
|
29 | 36 | install_data('app/resources/SciQLOP.desktop', install_dir : 'share/applications') |
|
30 | 37 | install_data('app/resources/SciQLOP.appdata.xml', install_dir : 'share/metainfo') |
|
31 | 38 | endif |
|
32 | 39 | |
|
33 | 40 | # Sets AMDA server that will be used during execution. |
|
34 | 41 | # Available values are: |
|
35 | 42 | # - "default": default AMDA server |
|
36 | 43 | # - "amdatest": AMDA test server |
|
37 | 44 | # - "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) |
|
38 | 45 | # - "localhost": use local AMDA server |
|
39 | 46 | # Any other value will lead to the use of the default server |
|
40 | 47 | add_project_arguments('-DSCIQLOP_AMDA_SERVER="hybrid"', language : 'cpp') |
|
41 | 48 | |
|
42 | 49 | subdir('core') |
|
43 | 50 | subdir('gui') |
|
44 | 51 | subdir('plugins') |
|
45 | 52 | subdir('app') |
|
46 | 53 | |
|
47 | 54 | cppcheck = find_program('cppcheck', required : false) |
|
48 | 55 | |
|
49 | 56 | if cppcheck.found() |
|
50 | 57 | run_target('cppcheck', |
|
51 | 58 | command : [cppcheck, '--enable=all', |
|
52 | 59 | '--project=' + join_paths(meson.build_root(), 'compile_commands.json')] |
|
53 | 60 | ) |
|
54 | 61 | endif |
General Comments 0
You need to be logged in to leave comments.
Login now