From 45893ca105777e1c5b97788cd169e400250ffa1f Mon Sep 17 00:00:00 2001 From: Erwin Janssen Date: Sun, 29 Jan 2017 10:35:17 +0100 Subject: [PATCH] Add lib/topfish to CMake build The static library 'topfish' has no dependencies, but the `with_smyrna` option had to be added. --- CMakeLists.txt | 6 ++++++ lib/CMakeLists.txt | 1 + lib/topfish/CMakeLists.txt | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 lib/topfish/CMakeLists.txt diff --git a/CMakeLists.txt b/CMakeLists.txt index 8d5f661ac..314dce63b 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -6,6 +6,7 @@ option(with_digcola "DIGCOLA features in neato layout engine" ON ) option(with_ipsepcola "IPSEPCOLA features in neato layout engine (disabled by default - C++ portability issues)." OFF ) option(with_ortho "ORTHO features in neato layout engine." ON ) option(with_sfdp "sfdp layout engine." ON ) +option(with_smyrna "SMYRNA large graph viewer (disabled by default - experimental)" OFF) if (with_digcola) add_definitions(-DDIGCOLA) @@ -23,6 +24,11 @@ if (with_sfdp) add_definitions(-DSFDP) endif (with_sfdp) +if (with_smyrna) + # TODO include dependency checks + add_definitions(-DSMYRNA) +endif (with_smyrna) + # ===================== Append local CMake module directory ==================== list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake") diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 7b7e125d2..2f5ca931d 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -15,6 +15,7 @@ add_subdirectory(rbtree) add_subdirectory(sparse) add_subdirectory(sfdpgen) add_subdirectory(spine) +add_subdirectory(topfish) add_subdirectory(twopigen) add_subdirectory(vmalloc) add_subdirectory(vpsc) diff --git a/lib/topfish/CMakeLists.txt b/lib/topfish/CMakeLists.txt new file mode 100644 index 000000000..dc6475e4b --- /dev/null +++ b/lib/topfish/CMakeLists.txt @@ -0,0 +1,18 @@ +if (with_smyrna) + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/neatogen +) + +add_library(topfish STATIC + # Header files + hierarchy.h + + # Source files + hierarchy.c + rescale_layout.c +) + +endif (with_smyrna) -- 2.40.0