]> granicus.if.org Git - graphviz/commitdiff
Add lib/neatogen to CMake build
authorErwin Janssen <erwinjanssen@outlook.com>
Tue, 24 Jan 2017 14:36:07 +0000 (15:36 +0100)
committerErwin Janssen <erwinjanssen@outlook.com>
Tue, 24 Jan 2017 14:36:07 +0000 (15:36 +0100)
The static library 'neatogen' has no dependencies, but the `with_digcola`
option had to be added, for this is also done in the Autotools build.

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

index 5c1a762079b233a2e95b332b89e2c652a4b6de74..0b29af6c45947c24382ab0bbee17cfc09fbcb94e 100644 (file)
@@ -3,10 +3,19 @@ project (Graphviz)
 
 # Build options
 # =============
+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 )
 
+if (with_digcola)
+    add_definitions(-DDIGCOLA)
+endif (with_digcola)
+
+if (with_ipsepcola)
+    add_definitions(-DIPSEPCOLA)
+endif (with_ipsepcola)
+
 if (with_ortho)
     add_definitions(-DORTHO)
 endif (with_ortho)
index 96fc73cbca2d7ac6eb02bfa1e682fedaced5486c..7b7e125d27d536e074dcf63b789a5aa05af0cd2f 100644 (file)
@@ -5,6 +5,7 @@ add_subdirectory(dotgen)
 add_subdirectory(fdpgen)
 add_subdirectory(ingraphs)
 add_subdirectory(label)
+add_subdirectory(neatogen)
 add_subdirectory(ortho)
 add_subdirectory(osage)
 add_subdirectory(pack)
diff --git a/lib/neatogen/CMakeLists.txt b/lib/neatogen/CMakeLists.txt
new file mode 100644 (file)
index 0000000..6ccb945
--- /dev/null
@@ -0,0 +1,103 @@
+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}/ortho
+    ${GRAPHVIZ_LIB_DIR}/pack
+    ${GRAPHVIZ_LIB_DIR}/pathplan
+    ${GRAPHVIZ_LIB_DIR}/rbtree
+    ${GRAPHVIZ_LIB_DIR}/sfdpgen
+    ${GRAPHVIZ_LIB_DIR}/sparse
+)
+
+set(sources
+    # Header files
+    adjust.h
+    bfs.h
+    call_tri.h
+    closest.h
+    conjgrad.h
+    defs.h
+    delaunay.h
+    digcola.h
+    dijkstra.h
+    edges.h
+    embed_graph.h
+    fPQ.h
+    geometry.h
+    heap.h
+    hedges.h
+    info.h
+    kkutils.h
+    matrix_ops.h
+    mem.h
+    multispline.h
+    neato.h
+    neatoprocs.h
+    overlap.h
+    pca.h
+    poly.h
+    quad_prog_solver.h
+    quad_prog_vpsc.h
+    site.h
+    sparsegraph.h
+    stress.h
+    voronoi.h
+
+    # Source files
+    adjust.c
+    bfs.c
+    call_tri.c
+    circuit.c
+    closest.c
+    compute_hierarchy.c
+    conjgrad.c
+    constrained_majorization.c
+    constraint.c
+    delaunay.c
+    dijkstra.c
+    edges.c
+    embed_graph.c
+    geometry.c
+    heap.c
+    hedges.c
+    info.c
+    kkutils.c
+    legal.c
+    lu.c
+    matinv.c
+    matrix_ops.c
+    memory.c
+    multispline.c
+    neatoinit.c
+    neatosplines.c
+    opt_arrangement.c
+    overlap.c
+    pca.c
+    poly.c
+    printvis.c
+    quad_prog_solve.c
+    site.c
+    smart_ini_x.c
+    solve.c
+    stuff.c
+    stress.c
+    voronoi.c
+)
+
+if (with_ipsepcola)
+    list(APPEND ${sources}
+        constrained_majorization_ipsep.c
+           mosek_quad_solve.c
+        mosek_quad_solve.h
+        quad_prog_vpsc.c
+    )
+    include_directories(${GRAPHVIZ_LIB_DIR}/vpsc)
+endif (with_ipsepcola)
+
+
+add_library(neatogen STATIC
+    ${sources}
+)