From: Erwin Janssen Date: Tue, 14 Mar 2017 20:53:58 +0000 (+0100) Subject: Add plugin/core to CMake build X-Git-Tag: 2.42.0~183^2~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c4225f5d7f2c1af3dbc704da5210bd6c8f287ec0;p=graphviz Add plugin/core to CMake build The dynamic library 'gvplugin_core' is the first library from `plugin` added to the CMake build. It has no dependencies outside the libraries in `lib`. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index cd1b8bc95..82b4d0a5d 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -136,3 +136,4 @@ include(CPack) # ======================= Specify subdirectories to build ====================== add_subdirectory(lib) +add_subdirectory(plugin) diff --git a/plugin/CMakeLists.txt b/plugin/CMakeLists.txt new file mode 100644 index 000000000..ad6d4787c --- /dev/null +++ b/plugin/CMakeLists.txt @@ -0,0 +1 @@ +add_subdirectory(core) diff --git a/plugin/core/CMakeLists.txt b/plugin/core/CMakeLists.txt new file mode 100644 index 000000000..ffe390622 --- /dev/null +++ b/plugin/core/CMakeLists.txt @@ -0,0 +1,64 @@ +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${CMAKE_CURRENT_BINARY_DIR} + ${TOP_SOURCE_DIR} + ${GRAPHVIZ_LIB_DIR}/ast + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/expr + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/gvpr + ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR}/sfio + ${GRAPHVIZ_LIB_DIR}/vmalloc + ${GRAPHVIZ_LIB_DIR}/xdot +) + +# Generate ps.h from ps.txt +add_custom_command( + OUTPUT ps.h + DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/ps.txt + COMMAND ${AWK_EXECUTABLE} -f ${TOP_SOURCE_DIR}/awk/stringize.awk + ${CMAKE_CURRENT_SOURCE_DIR}/ps.txt > ${CMAKE_CURRENT_BINARY_DIR}/ps.h +) + +add_library(gvplugin_core SHARED + # Header files + ps.h + + # Source files + gvloadimage_core.c + gvplugin_core.c + gvrender_core_dot.c + gvrender_core_json.c + gvrender_core_fig.c + gvrender_core_map.c + gvrender_core_mp.c + gvrender_core_pic.c + gvrender_core_pov.c + gvrender_core_ps.c + gvrender_core_svg.c + gvrender_core_tk.c + gvrender_core_vml.c +) + +target_link_libraries(gvplugin_core + cdt + cgraph + gvc +) + +# Installation location of library files +install( + TARGETS gvplugin_core + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${LIBRARY_INSTALL_DIR} + ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} +) + +# Specify library version and soversion +set_target_properties(gvplugin_core PROPERTIES + VERSION 6.0.0 + SOVERSION 6 +)