Skip to content
Snippets Groups Projects
Commit 90ed92a7 authored by alexey.stratulat's avatar alexey.stratulat
Browse files

[+] Added link to submodule libdap-chain-plugins-python. And calling the init...

[+] Added link to submodule libdap-chain-plugins-python. And calling the init / deinit function of this submodule. Added support key -DSUPPORT_PYTHON_PLUGINS in the Cmake file for build with support for Python plugins.
parent 2099e96c
No related branches found
No related tags found
No related merge requests found
......@@ -360,6 +360,15 @@ if(UNIX)
dap_core
)
if (SUPPORT_PYTHON_PLUGINS)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -DDAP_SUPPORT_PYTHON_PLUGINS")
message("Build with support python plugins")
set(Python_ADDITIONAL_VERSION 3.7 3.6 3.5 3.4)
find_package(PythonLibs REQUIRED)
set(NODE_LIBRARIES ${NODE_LIBRARIES} ${PYTHON_LIBRARIES} dap_chain_plugins_python)
include_directories(${PYTHON_INCLUDE_DIR} include/)
endif()
if(ANDROID )
set(ALL_LIBRARIES ${NODE_LIBRARIES} ${NODE_CLI_LIBRARIES} ${NODE_TOOL_LIBRARIES} log)
......
......@@ -110,6 +110,10 @@
#include "dap_defines.h"
#include "dap_file_utils.h"
#ifdef DAP_SUPPORT_PYTHON_PLUGINSv
#include "dap_chain_plugins.h"
#endif
#define ENC_HTTP_URL "/enc_init"
#define STREAM_CTL_URL "/stream_ctl"
......@@ -439,6 +443,12 @@ int main( int argc, const char **argv )
#endif
#endif
//Init python plugins
#ifdef DAP_SUPPORT_PYTHON_PLUGINS
log_it(L_NOTICE, "Loading python plugins");
dap_chain_plugins_init(g_config);
#endif
// Endless loop for server's requests processing
rc = dap_server_loop(l_server);
// After loop exit actions
......@@ -448,6 +458,9 @@ int main( int argc, const char **argv )
failure:
#ifdef DAP_SUPPORT_PYTHON_PLUGINS
dap_chain_plugins_deinit();
#endif
dap_stream_deinit();
dap_stream_ctl_deinit();
dap_http_folder_deinit();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment