From dbb953a58dd200ae9679b280224d02dbbb9177bb Mon Sep 17 00:00:00 2001 From: Matthew Fernandez Date: Sun, 3 Apr 2022 15:28:59 -0700 Subject: [PATCH] CMake: add Lasi plugin Gitlab: #1836 --- plugin/CMakeLists.txt | 1 + plugin/lasi/CMakeLists.txt | 57 ++++++++++++++++++++++++++++++++++++++ 2 files changed, 58 insertions(+) create mode 100644 plugin/lasi/CMakeLists.txt diff --git a/plugin/CMakeLists.txt b/plugin/CMakeLists.txt index e2c83a1a3..4c959d9e2 100644 --- a/plugin/CMakeLists.txt +++ b/plugin/CMakeLists.txt @@ -7,6 +7,7 @@ add_subdirectory(gdk) add_subdirectory(glitz) add_subdirectory(gs) add_subdirectory(gtk) +add_subdirectory(lasi) add_subdirectory(neato_layout) add_subdirectory(pango) add_subdirectory(poppler) diff --git a/plugin/lasi/CMakeLists.txt b/plugin/lasi/CMakeLists.txt new file mode 100644 index 000000000..2655b3615 --- /dev/null +++ b/plugin/lasi/CMakeLists.txt @@ -0,0 +1,57 @@ +find_package(Freetype) +find_package(PANGOCAIRO) +find_package(PkgConfig) +if(PkgConfig_FOUND) + pkg_check_modules(LASI lasi) +endif() + +if(Freetype_FOUND AND LASI_FOUND AND PANGOCAIRO_FOUND) + + add_library(gvplugin_lasi SHARED + gvloadimage_lasi.c + gvplugin_lasi.c + gvrender_lasi.cpp + ) + + target_include_directories(gvplugin_lasi PRIVATE + ../../lib + ../../lib/cdt + ../../lib/cgraph + ../../lib/common + ../../lib/gvc + ../../lib/pathplan + ) + + target_include_directories(gvplugin_lasi SYSTEM PRIVATE + ${Freetype_INCLUDE_DIRS} + ${LASI_INCLUDE_DIRS} + ${PANGOCAIRO_INCLUDE_DIRS} + ) + + target_link_libraries(gvplugin_lasi + ${Freetype_LIBRARIES} + ${LASI_LIBRARIES} + ${MATH_LIB} + ${PANGOCAIRO_LIBRARIES} + ) + + install( + TARGETS gvplugin_lasi + RUNTIME DESTINATION ${BINARY_INSTALL_DIR} + LIBRARY DESTINATION ${PLUGIN_INSTALL_DIR} + ARCHIVE DESTINATION ${LIBRARY_INSTALL_DIR} + ) + + set_target_properties(gvplugin_lasi 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_lasi PROPERTIES + RUNTIME_OUTPUT_NAME gvplugin_lasi-${GRAPHVIZ_PLUGIN_VERSION} + ) + endif() + +endif() -- 2.40.0