Add preliminary construct for plugin renderers (shared object renderers)

This commit is contained in:
Mario Hüttel 2019-11-12 19:12:57 +01:00
parent 40a7e5a650
commit 74dfbd9b34
5 changed files with 23 additions and 1 deletions

View File

@ -11,6 +11,7 @@ add_compile_options(-Wall -Wextra -Wold-style-declaration -Wuninitialized -Wmayb
add_subdirectory(resources)
add_subdirectory(doxygen)
add_subdirectory(version)
add_subdirectory(plugins)
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})

View File

@ -6,5 +6,5 @@ if (DOXYGEN_FOUND)
WORKING_DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}
COMMENT "Generating documentation with Doxygen")
else (DOXYGEN_FOUND)
message("Doxygen need to be installed to generate the doxygen documentation")
message("Doxygen needs to be installed to generate the doxygen documentation")
endif (DOXYGEN_FOUND)

2
plugins/CMakeLists.txt Normal file
View File

@ -0,0 +1,2 @@
add_subdirectory(python-renderer)
add_custom_target(plugins DEPENDS pythonrenderer)

View File

@ -0,0 +1,12 @@
project(pythonrenderer)
cmake_minimum_required(VERSION 2.8)
find_package(PkgConfig REQUIRED)
pkg_search_module(PYTHON REQUIRED python3)
aux_source_directory(src SOURCES)
include_directories(${PYTHON_INCLUDE_DIRS} ${CMAKE_CURRENT_SOURCE_DIR}/include)
link_libraries(${PYTHON_LDFLAGS} version)
add_library(${PROJECT_NAME} SHARED EXCLUDE_FROM_ALL ${SOURCES})
add_dependencies(${PROJECT_NAME} version)

View File

@ -0,0 +1,7 @@
#include <stdio.h>
#include <stdlib.h>
int a(void)
{
return 0;
}