From: Matthew Fernandez Date: Sat, 19 Mar 2022 20:47:17 +0000 (-0700) Subject: CMake: enable lib/edgepaint compilation X-Git-Tag: 4.0.0~162^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=91ffbbde70d58d3e56efa9cb07a2da459b21548e;p=graphviz CMake: enable lib/edgepaint compilation 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 --- diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index e258d2260..1a311df56 100644 --- a/lib/CMakeLists.txt +++ b/lib/CMakeLists.txt @@ -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 index 000000000..344f22e22 --- /dev/null +++ b/lib/edgepaint/CMakeLists.txt @@ -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()