]> granicus.if.org Git - graphviz/commitdiff
Add lib/fdpgen to CMake build
authorErwin Janssen <erwinjanssen@outlook.com>
Thu, 5 Jan 2017 09:20:19 +0000 (10:20 +0100)
committerErwin Janssen <erwinjanssen@outlook.com>
Thu, 19 Jan 2017 11:53:50 +0000 (12:53 +0100)
The static library fdpgen has no dependencies. Two additional function
checks have been added: drand48 and srand48.

cmake/config_checks.cmake
config-cmake.h.in
lib/CMakeLists.txt
lib/fdpgen/CMakeLists.txt [new file with mode: 0644]

index ed440367046ffeffdc492b9ef57b6a18f624658d..8eb588258c158333343fde7908c10480b4eff21a 100644 (file)
@@ -1,13 +1,15 @@
 # Header checks
 include(CheckIncludeFile)
 
-CHECK_INCLUDE_FILE(unistd.h HAVE_UNISTD_H)
+check_include_file(unistd.h HAVE_UNISTD_H)
 
 # Function checks
 include(CheckFunctionExists)
 
-CHECK_FUNCTION_EXISTS( cbrt        HAVE_CBRT       )
-CHECK_FUNCTION_EXISTS( strcasecmp  HAVE_STRCASECMP )
+check_function_exists( drand48     HAVE_DRAND48    )
+check_function_exists( cbrt        HAVE_CBRT       )
+check_function_exists( srand48     HAVE_SRAND48    )
+check_function_exists( strcasecmp  HAVE_STRCASECMP )
 
 # Write check results to config.h header
 configure_file(config-cmake.h.in config.h)
index dce248e0d0d7d5b2cb752a7a99fcd65e33535a35..4480e4928f02485d26aa50e6481ca53ea9c754a2 100644 (file)
@@ -5,5 +5,7 @@
 #cmakedefine HAVE_UNISTD_H
 
 // Functions
+#cmakedefine HAVE_DRAND48
 #cmakedefine HAVE_CBRT
+#cmakedefine HAVE_SRAND48
 #cmakedefine HAVE_STRCASECMP
index f7b9acd04dd035992bd712926823f03e8f6bb28c..0e990dab9e814db10ef348f6952495d27f5fe861 100644 (file)
@@ -2,6 +2,7 @@
 add_subdirectory(cdt)
 add_subdirectory(circogen)
 add_subdirectory(dotgen)
+add_subdirectory(fdpgen)
 add_subdirectory(patchwork)
 add_subdirectory(pathplan)
 add_subdirectory(twopigen)
diff --git a/lib/fdpgen/CMakeLists.txt b/lib/fdpgen/CMakeLists.txt
new file mode 100644 (file)
index 0000000..9922042
--- /dev/null
@@ -0,0 +1,32 @@
+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
+    ${GRAPHVIZ_LIB_DIR}/sparse
+)
+
+add_library(fdpgen STATIC
+    # Header files
+    clusteredges.h
+    comp.h
+    dbg.h
+    fdp.h
+    grid.h
+    tlayout.h
+    xlayout.h
+
+    # Source files
+    clusteredges.c
+    comp.c
+    dbg.c
+    fdpinit.c
+    grid.c
+    layout.c
+    tlayout.c
+    xlayout.c
+)