From: Matthew Fernandez Date: Sun, 3 Apr 2022 19:29:44 +0000 (-0700) Subject: CMake: add Glitz plugin X-Git-Tag: 4.0.0~130^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=12f5869bf4334caf5318b0b44d874b546cc7a542;p=graphviz CMake: add Glitz plugin Gitlab: #1836 --- diff --git a/plugin/CMakeLists.txt b/plugin/CMakeLists.txt index 16a41b419..6f31f36aa 100644 --- a/plugin/CMakeLists.txt +++ b/plugin/CMakeLists.txt @@ -3,6 +3,7 @@ add_subdirectory(devil) add_subdirectory(dot_layout) add_subdirectory(gd) add_subdirectory(gdiplus) +add_subdirectory(glitz) add_subdirectory(gs) add_subdirectory(neato_layout) add_subdirectory(pango) diff --git a/plugin/glitz/CMakeLists.txt b/plugin/glitz/CMakeLists.txt new file mode 100644 index 000000000..1901c3427 --- /dev/null +++ b/plugin/glitz/CMakeLists.txt @@ -0,0 +1,52 @@ +find_package(PANGOCAIRO) +find_package(PkgConfig) +if(PkgConfig_FOUND) + pkg_check_modules(GLITZ glitz) +endif() + +if(GLITZ_FOUND AND PANGOCAIRO_FOUND) + + add_library(gvplugin_glitz SHARED + gvdevice_glitz.c + gvplugin_glitz.c + ) + + target_include_directories(gvplugin_glitz PRIVATE + ../../lib + ../../lib/cdt + ../../lib/cgraph + ../../lib/common + ../../lib/gvc + ../../lib/pathplan + ) + + target_include_directories(gvplugin_glitz SYSTEM PRIVATE + ${GLITZ_INCLUDE_DIRS} + ${PANGOCAIRO_INCLUDE_DIRS} + ) + + target_link_libraries(gvplugin_glitz + ${GLITZ_LIBRARIES} + ${PANGOCAIRO_LIBRARIES} + ) + + install( + TARGETS gvplugin_glitz + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} + ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} + ) + + set_target_properties(gvplugin_glitz PROPERTIES + VERSION ${GRAPHVIZ_PLUGIN_VERSION}.0.0 + SOVERSION ${GRAPHVIZ_PLUGIN_VERSION} + ) + + if(MINGW) + # work around https://gitlab.kitware.com/cmake/cmake/-/issues/21716 + set_target_properties(gvplugin_glitz PROPERTIES + RUNTIME_OUTPUT_NAME gvplugin_glitz-${GRAPHVIZ_PLUGIN_VERSION} + ) + endif() + +endif()