From: Erwin Janssen Date: Fri, 20 Jan 2017 18:02:04 +0000 (+0100) Subject: Add lib/sfdpgen to CMake build X-Git-Tag: 2.42.0~213^2^2~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=433920a361350ac9c3f992efc8ee41c63b8e1aea;p=graphviz Add lib/sfdpgen to CMake build The static library 'sfdpgen' has no dependencies, but the `WITH_SFDP` option had to be added, for this is also done in the Autotools build. If WITH_SFDP is set, the define SFDP is also added (also added this for ORTHO, this was missing). --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 890f9a9d7..db69a8bde 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,15 @@ project (Graphviz) # ============= 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 ) + +if (WITH_ORTHO) + add_definitions(-DORTHO) +endif (WITH_ORTHO) + +if (WITH_SFDP) + add_definitions(-DSFDP) +endif (WITH_SFDP) # Append local CMake module directory # =================================== diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 3741e3199..96fc73cbc 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -12,6 +12,7 @@ add_subdirectory(patchwork) add_subdirectory(pathplan) add_subdirectory(rbtree) add_subdirectory(sparse) +add_subdirectory(sfdpgen) add_subdirectory(spine) add_subdirectory(twopigen) add_subdirectory(vmalloc) diff --git a/lib/sfdpgen/CMakeLists.txt b/lib/sfdpgen/CMakeLists.txt new file mode 100644 index 000000000..97b7c19e3 --- /dev/null +++ b/lib/sfdpgen/CMakeLists.txt @@ -0,0 +1,39 @@ +if (WITH_SFDP) + +include_directories( + ${CMAKE_CURRENT_SOURCE_DIR} + ${GRAPHVIZ_LIB_DIR}/cdt + ${GRAPHVIZ_LIB_DIR}/cgraph + ${GRAPHVIZ_LIB_DIR}/common + ${GRAPHVIZ_LIB_DIR}/gvc + ${GRAPHVIZ_LIB_DIR}/neatogen + ${GRAPHVIZ_LIB_DIR}/pack + ${GRAPHVIZ_LIB_DIR}/pathplan + ${GRAPHVIZ_LIB_DIR}/rbtree + ${GRAPHVIZ_LIB_DIR}/sparse +) + +add_library(sfdpgen STATIC + # Header files + Multilevel.h + post_process.h + PriorityQueue.h + sfdp.h + sfdpinternal.h + sparse_solve.h + spring_electrical.h + stress_model.h + uniform_stress.h + + # Source files + Multilevel.c + post_process.c + PriorityQueue.c + sfdpinit.c + sparse_solve.c + spring_electrical.c + stress_model.c + uniform_stress.c +) + +endif (WITH_SFDP) \ No newline at end of file