##// END OF EJS Templates
Switch to speasy...
Switch to speasy Signed-off-by: Alexis Jeandet <alexis.jeandet@member.fsf.org>

File last commit:

r1505:4bf34af32858
r1510:0046d29d6c44 PySide2
Show More
meson.build
55 lines | 2.3 KiB | text/plain | TextLexer
Update Meson build def...
r1480 shiboken2 = find_program('shiboken2')
qmake = find_program('qmake-qt5','qmake')
pymod = import('python')
Minor build fixes on Python stuff detection...
r1488 python3 = pymod.find_installation('python3', modules:['PySide2','shiboken2', 'shiboken2_generator', 'numpy'])
Force PySide2 usage for QtConsole...
r1503 python3_dep = python3.dependency(embed:true)
Minor build fixes on Python stuff detection...
r1488 numpy_inc = run_command(python3, '-c', 'import numpy;print(numpy.get_include())').stdout().strip('\n')
Update Meson build def...
r1480
qt5_modules = ['QtCore','QtGui','QtWidgets']
qt_headers_path = run_command(qmake, '-query', 'QT_INSTALL_HEADERS').stdout().strip('\n')
generated_srcs = run_command(python3, 'src_list.py', 'meson').stdout().split(';')
modules_arg = '--modules=@0@'.format(','.join(qt5_modules))
shiboken2_build_flags = run_command(python3, 'shiboken-helper.py', '--includes', modules_arg).stdout().strip('\n').split(' ')
shiboken2_link_flags = run_command(python3, 'shiboken-helper.py', '--libs', modules_arg).stdout().strip('\n').split(' ')
shiboken2_typesystem = run_command(python3, 'shiboken-helper.py', '--typesystem').stdout().strip('\n')
Few fixes to build on CentOS 7 and adds simple example of virtual product...
r1505 message('shiboken2_build_flags = @0@'.format(shiboken2_build_flags))
message('shiboken2_link_flags = @0@'.format(shiboken2_link_flags))
message('shiboken2_typesystem = @0@'.format(shiboken2_typesystem))
Update Meson build def...
r1480 sciqlop_bindings_incs = shiboken2_build_flags + [
'-I'+meson.current_source_dir()+'/../../gui/include',
'-I'+meson.current_source_dir()+'/../../core/include',
Removed CMake scripts \o/...
r1482 '-I'+meson.current_source_dir()+'/../../subprojects/TimeSeries/include',
Added cpp_utils as subproject and removed few warnings...
r1485 '-I'+meson.current_source_dir()+'/../../subprojects/cpp_utils/include',
Update Meson build def...
r1480 '-I'+python3.get_path('include'),
Minor build fixes on Python stuff detection...
r1488 '-I'+qt_headers_path,
'-I'+numpy_inc
Update Meson build def...
r1480 ]
foreach mod:qt5_modules
sciqlop_bindings_incs += ['-I'+qt_headers_path+'/'+mod]
endforeach
sciqlop_bindings_src = files('bindings.h', 'PyDataProvider.h', 'numpy_wrappers.h', 'numpy_wrappers.cpp')
subdir('SciQLopBindings')
Auto copy test plugin to right output folder...
r1487 subdir('plugins')
Update Meson build def...
r1480
shiboken_dep = declare_dependency(compile_args: shiboken2_build_flags, link_args: shiboken2_link_flags)
sciqlop_bindings = python3.extension_module('SciQLopBindings',sciqlop_bindings_src,shiboken2_generator_out,
Minor build fixes on Python stuff detection...
r1488 dependencies : [sciqlop_app_dep, python3_dep, shiboken_dep, cpp_utils_dep],
include_directories : numpy_inc
Update Meson build def...
r1480 )
configure_file(input:'main.py', output:'main.py', copy:true)
Added new main wrapper to meson build desc...
r1481
Force PySide2 usage for QtConsole...
r1503 executable('sciqlop', 'main.cpp', dependencies :python3_dep)