Rename python renderer to plugin example and leave it be as a template
This commit is contained in:
parent
efb1af7ee0
commit
3b6837b886
@ -30,6 +30,7 @@ pkg_search_module(GLIB REQUIRED glib-2.0)
|
|||||||
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
|
pkg_check_modules(GTK3 REQUIRED gtk+-3.0)
|
||||||
pkg_check_modules(CAIRO REQUIRED cairo)
|
pkg_check_modules(CAIRO REQUIRED cairo)
|
||||||
|
|
||||||
|
include_directories(${GLIB_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
||||||
add_subdirectory(plugins)
|
add_subdirectory(plugins)
|
||||||
|
|
||||||
add_compile_options(-Wall -Wextra -Wold-style-declaration -Wuninitialized -Wmaybe-uninitialized -Wunused-parameter)
|
add_compile_options(-Wall -Wextra -Wold-style-declaration -Wuninitialized -Wmaybe-uninitialized -Wunused-parameter)
|
||||||
@ -48,7 +49,6 @@ add_subdirectory(doxygen)
|
|||||||
add_subdirectory(translations)
|
add_subdirectory(translations)
|
||||||
add_subdirectory(version)
|
add_subdirectory(version)
|
||||||
|
|
||||||
include_directories(${GLIB_INCLUDE_DIRS} ${GTK3_INCLUDE_DIRS} ${CAIRO_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include)
|
|
||||||
link_directories(${GLIB_LINK_DIRS} ${GTK3_LINK_DIRS} ${CAIRO_LINK_DIRS})
|
link_directories(${GLIB_LINK_DIRS} ${GTK3_LINK_DIRS} ${CAIRO_LINK_DIRS})
|
||||||
add_definitions(${GLIB2_CFLAGS_OTHER})
|
add_definitions(${GLIB2_CFLAGS_OTHER})
|
||||||
|
|
||||||
|
@ -41,6 +41,11 @@
|
|||||||
*/
|
*/
|
||||||
#define EXTERNAL_LIBRARY_FORK_REQUEST exported_fork_request
|
#define EXTERNAL_LIBRARY_FORK_REQUEST exported_fork_request
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @brief Define for declaring the exported functions
|
||||||
|
*/
|
||||||
|
#define FUNC_DECL(FUNC) FUNC
|
||||||
|
|
||||||
/** @} */
|
/** @} */
|
||||||
|
|
||||||
#endif /* __EXTERNAL_RENDERER_INTERFACES_H__ */
|
#endif /* __EXTERNAL_RENDERER_INTERFACES_H__ */
|
||||||
|
@ -1,2 +1,2 @@
|
|||||||
add_subdirectory(python-renderer)
|
add_subdirectory(plugin-example)
|
||||||
add_custom_target(plugins DEPENDS pythonrenderer)
|
add_custom_target(plugins DEPENDS pluginexample)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
project(pythonrenderer)
|
project(pluginexample)
|
||||||
cmake_minimum_required(VERSION 2.8)
|
cmake_minimum_required(VERSION 2.8)
|
||||||
find_package(PkgConfig REQUIRED)
|
find_package(PkgConfig REQUIRED)
|
||||||
pkg_search_module(PYTHON REQUIRED python3)
|
pkg_search_module(PYTHON REQUIRED python3)
|
19
plugins/plugin-example/src/plugin-main.c
Normal file
19
plugins/plugin-example/src/plugin-main.c
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
#include <stdio.h>
|
||||||
|
#include <glib.h>
|
||||||
|
#include <gds-render/gds-utils/gds-types.h>
|
||||||
|
#include <gds-render/output-renderers/external-renderer-interfaces.h>
|
||||||
|
|
||||||
|
int FUNC_DECL(EXTERNAL_LIBRARY_RENDER_FUNCTION)(struct gds_cell *toplevel, GList *layer_info_list, const char *output_file_name, double scale)
|
||||||
|
{
|
||||||
|
if (!toplevel)
|
||||||
|
return -1000;
|
||||||
|
|
||||||
|
printf("Rendering %s\n", toplevel->name);
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
int FUNC_DECL(EXTERNAL_LIBRARY_INIT_FUNCTION)(const char *params, const char *version)
|
||||||
|
{
|
||||||
|
printf("Init with params: %s\ngds-render version: %s\n", params, version);
|
||||||
|
return 0;
|
||||||
|
}
|
@ -1,7 +0,0 @@
|
|||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
|
|
||||||
int a(void)
|
|
||||||
{
|
|
||||||
return 0;
|
|
||||||
}
|
|
Loading…
Reference in New Issue
Block a user