]> granicus.if.org Git - graphviz/commitdiff
Add lib/ortho to CMake build
authorErwin Janssen <erwinjanssen@outlook.com>
Fri, 20 Jan 2017 16:38:47 +0000 (17:38 +0100)
committerErwin Janssen <erwinjanssen@outlook.com>
Fri, 20 Jan 2017 16:38:47 +0000 (17:38 +0100)
The static library 'ortho' has no dependencies, but the `WITH_ORTHO`
option had to be added, for this is also done in the Autotools build.

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

index 1458f397f350e112554706f8638c7139b533e6ff..5ab14565aea1b6f9c38f78d2fc19c4213dc7c09a 100644 (file)
@@ -1,6 +1,10 @@
 cmake_minimum_required (VERSION 2.8 FATAL_ERROR)
 project (Graphviz)
 
+# Build options
+# =============
+option(WITH_ORTHO      "ORTHO features in neato layout engine." ON )
+
 # Append local CMake module directory
 # ===================================
 list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")
index 5d0a236b060b271d00540f6df530cdff022a62d0..a19450e5300d2d4d0f27e4c0ffca8f22478d778f 100644 (file)
@@ -5,6 +5,7 @@ add_subdirectory(dotgen)
 add_subdirectory(fdpgen)
 add_subdirectory(ingraphs)
 add_subdirectory(label)
+add_subdirectory(ortho)
 add_subdirectory(osage)
 add_subdirectory(pack)
 add_subdirectory(patchwork)
diff --git a/lib/ortho/CMakeLists.txt b/lib/ortho/CMakeLists.txt
new file mode 100644 (file)
index 0000000..2cef8c3
--- /dev/null
@@ -0,0 +1,37 @@
+if (WITH_ORTHO)
+
+add_definitions(-D_BLD_gvc=1)
+
+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
+)
+
+add_library(ortho STATIC
+    # Header files
+    fPQ.h
+    maze.h
+    ortho.h
+    partition.h
+    rawgraph.h
+    sgraph.h
+    structures.h
+    trap.h
+
+    # Source files
+    fPQ.c
+    maze.c
+    ortho.c
+    partition.c
+    rawgraph.c
+    sgraph.c
+    trapezoid.c
+)
+
+endif (WITH_ORTHO)
\ No newline at end of file