]> granicus.if.org Git - graphviz/commitdiff
CMake: enable lib/edgepaint compilation
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 19 Mar 2022 20:47:17 +0000 (13:47 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 26 Mar 2022 01:44:45 +0000 (18:44 -0700)
Note that the target here is named “edgepaintib” in anticipation of future
enabling of cmd/edgepaint claiming the name “edgepaint”. This also does not
define a separate liblab_gamut, as the Autotools build does. This separate
library seems only useful for cmd/edgepaint, so it does not seem worth splitting
it out as a separate library.

Gitlab: #1836

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

index e258d2260377233f5e52674bd4094a1134021a0f..1a311df5667055cab05106785c29ed5c5105c556 100644 (file)
@@ -4,6 +4,7 @@ add_subdirectory(cdt)
 add_subdirectory(circogen)
 add_subdirectory(common)
 add_subdirectory(dotgen)
+add_subdirectory(edgepaint)
 add_subdirectory(expr)
 add_subdirectory(fdpgen)
 add_subdirectory(gvpr)
diff --git a/lib/edgepaint/CMakeLists.txt b/lib/edgepaint/CMakeLists.txt
new file mode 100644 (file)
index 0000000..344f22e
--- /dev/null
@@ -0,0 +1,32 @@
+add_definitions(-DLAB_GAMUT_EXPORTS)
+
+add_library(edgepaintlib STATIC
+  edge_distinct_coloring.h
+  furtherest_point.h
+  intersection.h
+  lab.h
+  lab_gamut.h
+  node_distinct_coloring.h
+
+  edge_distinct_coloring.c
+  furtherest_point.c
+  intersection.c
+  lab.c
+  lab_gamut.c
+  node_distinct_coloring.c
+)
+
+target_include_directories(edgepaintlib PRIVATE
+  ${GRAPHVIZ_LIB_DIR}
+  ${GRAPHVIZ_LIB_DIR}/cdt
+  ${GRAPHVIZ_LIB_DIR}/cgraph
+  ${GRAPHVIZ_LIB_DIR}/common
+  ${GRAPHVIZ_LIB_DIR}/gvc
+  ${GRAPHVIZ_LIB_DIR}/pathplan
+)
+
+# work around needed for an object library
+# https://gitlab.com/graphviz/graphviz/-/issues/1613
+if(APPLE)
+  target_compile_options(edgepaintlib PRIVATE "-fno-common")
+endif()