From: Erwin Janssen Date: Fri, 20 Jan 2017 16:38:47 +0000 (+0100) Subject: Add lib/ortho to CMake build X-Git-Tag: 2.42.0~213^2^2~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=49eb96c8a826e6ada6bf5515a1579e88e593c358;p=graphviz Add lib/ortho to CMake build 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. --- diff --git a/CMakeLists.txt b/CMakeLists.txt index 1458f397f..5ab14565a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -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") diff --git a/lib/CMakeLists.txt b/lib/CMakeLists.txt index 5d0a236b0..a19450e53 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(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 index 000000000..2cef8c314 --- /dev/null +++ b/lib/ortho/CMakeLists.txt @@ -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