From ee3087bae6ef13daec3aafe43802d7e4a500d294 Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Sun, 30 Jun 2019 14:46:03 +0200 Subject: [PATCH] cmake: add support for garphviz --- CMakeLists.txt | 3 +++ lib/CMakeLists.txt | 5 +++++ 2 files changed, 8 insertions(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index a49c60ec3..1cd3f735e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -106,6 +106,7 @@ pkg_check_modules(COMEDILIB IMPORTED_TARGET comedilib>=0.11.0) pkg_check_modules(LIBZMQ IMPORTED_TARGET libzmq>=2.2.0) pkg_check_modules(LIBULDAQ IMPORTED_TARGET libuldaq>=1.0.0) pkg_check_modules(UUID IMPORTED_TARGET REQUIRED uuid>=2.23) +pkg_check_modules(NANOMSG IMPORTED_TARGET libcgraph>=2.30) pkg_check_modules(NANOMSG IMPORTED_TARGET nanomsg) if(NOT NANOMSG_FOUND) pkg_check_modules(NANOMSG IMPORTED_TARGET libnanomsg>=1.0.0) @@ -126,6 +127,7 @@ cmake_dependent_option(WITH_TESTS "Run tests" cmake_dependent_option(WITH_PLUGINS "Build plugins" ON "TOPLEVEL_PROJECT" OFF) cmake_dependent_option(WITH_CLIENTS "Build client applications" ON "TOPLEVEL_PROJECT" OFF) cmake_dependent_option(WITH_DOC "Build documentation" ON "TOPLEVEL_PROJECT" OFF) +cmake_dependent_option(WITH_GRAPHVIZ "Build with Graphviz" ON "Graphviz_FOUND" OFF) cmake_dependent_option(WITH_NODE_AMQP "Build with amqp node-type" ON "RABBITMQ_C_FOUND" OFF) cmake_dependent_option(WITH_NODE_COMEDI "Build with comedi node-type" ON "COMEDILIB_FOUND" OFF) @@ -206,6 +208,7 @@ add_feature_info(TOOLS WITH_TOOLS "Build auxil add_feature_info(TESTS WITH_TESTS "Run tests") add_feature_info(PLUGINS WITH_PLUGINS "Build plugins") add_feature_info(CLIENTS WITH_CLIENTS "Build client applications") +add_feature_info(GRAPHVIZ WITH_GRAPHVIZ "Build with Graphviz support") add_feature_info(DOC WITH_DOC "Build documentation") add_feature_info(NODE_AMQP WITH_NODE_AMQP "Build with amqp node-type") diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 98b018bcb..e5c14660c 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -92,6 +92,11 @@ if(WITH_CONFIG) list(APPEND LIBRARIES PkgConfig::LIBCONFIG) endif() +if(WITH_GRAPHVIZ) + list(APPEND INCLUDE_DIRS ${GRAPHVIZ_INCLUDE_DIRS}) + list(APPEND LIBRARIES ${GRAPHVIZ_LIBRARIES}) +endif() + if(WITH_HOOKS) list(APPEND LIB_SRC hook.cpp