]> granicus.if.org Git - graphviz/commitdiff
Add lib/sfdpgen to CMake build
authorErwin Janssen <erwinjanssen@outlook.com>
Fri, 20 Jan 2017 18:02:04 +0000 (19:02 +0100)
committerErwin Janssen <erwinjanssen@outlook.com>
Fri, 20 Jan 2017 18:02:04 +0000 (19:02 +0100)
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).

CMakeLists.txt
lib/CMakeLists.txt
lib/sfdpgen/CMakeLists.txt [new file with mode: 0644]

index 890f9a9d76b9c92890f166c27a2e02b635f6bb33..db69a8bdeef03ae629f36b83e6962c62549843f7 100644 (file)
@@ -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
 # ===================================
index 3741e319905ce1158f407b121f359f8cd2604732..96fc73cbca2d7ac6eb02bfa1e682fedaced5486c 100644 (file)
@@ -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 (file)
index 0000000..97b7c19
--- /dev/null
@@ -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