@@ -0,0 +1,38 | |||||
|
1 | ||||
|
2 | pybind11_dep = dependency('pybind11', required : true, fallback:['pybind11','pybind11_dep']) | |||
|
3 | ||||
|
4 | python_providers_moc_headers = [ | |||
|
5 | 'include/python_providers.h' | |||
|
6 | ] | |||
|
7 | ||||
|
8 | python_providers_sources = [ | |||
|
9 | 'src/python_providers.cpp' | |||
|
10 | ] | |||
|
11 | ||||
|
12 | python_providers_inc = include_directories(['include']) | |||
|
13 | ||||
|
14 | ||||
|
15 | gen = generator(moc, | |||
|
16 | output : 'moc_@BASENAME@.cpp', | |||
|
17 | arguments : ['@INPUT@', | |||
|
18 | '-DSCIQLOP_PLUGIN_JSON_FILE_PATH="'+meson.source_root()+'/plugins/python_providers/resources/python_providers.json"', | |||
|
19 | '-I', meson.current_source_dir()+'/include', | |||
|
20 | '-I', meson.current_source_dir()+'/../../core/include/', | |||
|
21 | '-o', '@OUTPUT@']) | |||
|
22 | ||||
|
23 | python_providers_moc_files = gen.process(python_providers_moc_headers) | |||
|
24 | ||||
|
25 | cpp_args = ['-DPYTHON_PROVIDERS_LIB','-DQT_PLUGIN', '-DQT_NO_KEYWORDS'] | |||
|
26 | if(get_option('default_library')=='static') | |||
|
27 | cpp_args += ['-DQT_STATICPLUGIN'] | |||
|
28 | endif | |||
|
29 | ||||
|
30 | sciqlop_python_providers = library('pythonproviders', | |||
|
31 | python_providers_sources, | |||
|
32 | python_providers_moc_files, | |||
|
33 | cpp_args : cpp_args, | |||
|
34 | include_directories : [python_providers_inc], | |||
|
35 | dependencies : [sciqlop_core, sciqlop_gui, pybind11_dep], | |||
|
36 | install : true, | |||
|
37 | install_dir : join_paths(get_option('libdir'), 'SciQLop') | |||
|
38 | ) |
@@ -30,7 +30,7 endif | |||||
30 | app_libs = [] |
|
30 | app_libs = [] | |
31 | cpp_args = [] |
|
31 | cpp_args = [] | |
32 | if 'static' == get_option('default_library') |
|
32 | if 'static' == get_option('default_library') | |
33 | app_libs = [ sciqlop_amdaplugin, sciqlop_mockplugin] |
|
33 | app_libs = [sciqlop_mockplugin, sciqlop_python_providers] | |
34 | cpp_args += ['-DQT_STATICPLUGIN'] |
|
34 | cpp_args += ['-DQT_STATICPLUGIN'] | |
35 | endif |
|
35 | endif | |
36 |
|
36 |
@@ -1,1 +1,1 | |||||
1 | Subproject commit d831ff83b9bb13121444a5bd86040d4bddfe72d3 |
|
1 | Subproject commit a0c89a70c83c407d12cf22096a0e7ffae4763e00 |
@@ -1,2 +1,3 | |||||
1 | subdir('mockplugin') |
|
1 | subdir('mockplugin') | |
2 | subdir('amda') |
|
2 | subdir('python_providers') | |
|
3 | #subdir('amda') |
@@ -20,6 +20,7 class PythonProviders : public QObject, public IPlugin | |||||
20 | public: |
|
20 | public: | |
21 | /// @sa IPlugin::initialize() |
|
21 | /// @sa IPlugin::initialize() | |
22 | void initialize() override; |
|
22 | void initialize() override; | |
|
23 | ~PythonProviders(); | |||
23 | }; |
|
24 | }; | |
24 |
|
25 | |||
25 | #endif // PYTHON_PROVIDERS_H |
|
26 | #endif // PYTHON_PROVIDERS_H |
@@ -4,6 +4,14 namespace py = pybind11; | |||||
4 |
|
4 | |||
5 | void PythonProviders::initialize() |
|
5 | void PythonProviders::initialize() | |
6 | { |
|
6 | { | |
7 |
py:: |
|
7 | py::initialize_interpreter(false); | |
8 | py::print("Hello, World!"); |
|
8 | py::print("Hello, World!"); | |
|
9 | py::print("Hello, World!"); | |||
|
10 | py::print("Hello, World!"); | |||
|
11 | py::print("Hello, World!"); | |||
|
12 | } | |||
|
13 | ||||
|
14 | PythonProviders::~PythonProviders() | |||
|
15 | { | |||
|
16 | py::finalize_interpreter(); | |||
9 | } |
|
17 | } |
General Comments 0
You need to be logged in to leave comments.
Login now