From: Erwin Janssen Date: Tue, 24 Jan 2017 14:36:07 +0000 (+0100) Subject: Add lib/neatogen to CMake build X-Git-Tag: 2.42.0~213^2^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e511f93305411a547d92e41ba040abca480ddde2;p=graphviz Add lib/neatogen to CMake build 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. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c1a76207..0b29af6c4 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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) diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 96fc73cbc..7b7e125d2 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -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 index 000000000..6ccb9455a --- /dev/null +++ b/lib/neatogen/CMakeLists.txt @@ -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} +)