]> granicus.if.org Git - graphviz/commitdiff
disambiguate lib/pack/*.c #includes
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Sat, 22 Aug 2020 01:46:43 +0000 (18:46 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 10 Sep 2020 02:26:52 +0000 (19:26 -0700)
Related to #1785.

lib/pack/CMakeLists.txt
lib/pack/Makefile.am
lib/pack/ccomps.c
lib/pack/pack.c
lib/pack/ptest.c

index 8908862950219f8b719f941893852622545c5d26..54dc9523a8601e6acb882700bcac20b1f79e38f1 100644 (file)
@@ -1,15 +1,5 @@
 add_definitions(-DGVC_EXPORTS)
 
-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}/pathplan
-)
-
 add_library(pack STATIC
     # Header files
     pack.h
@@ -19,6 +9,17 @@ add_library(pack STATIC
     pack.c
 )
 
+target_include_directories(pack PRIVATE
+    ${GRAPHVIZ_LIB_DIR}
+    ${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}/pathplan
+)
+
 # Specify headers to be installed
 install(
     FILES pack.h
index 085e2de81f1bbb2b8f06a6e72c3f463f4fd0b7b9..a959fea8e012273de3c761c44d832b13d5ca1d4b 100644 (file)
@@ -5,6 +5,7 @@ pdfdir = $(pkgdatadir)/doc/pdf
 #pkgconfigdir = $(libdir)/pkgconfig
 
 AM_CPPFLAGS = \
+       -I$(top_srcdir)/lib \
         -I$(top_srcdir)/lib/common \
        -I$(top_srcdir)/lib/gvc \
        -I$(top_srcdir)/lib/neatogen \
index ce88da109aa3793396e93e2dba289925ed473b08..2726e5851b88dd7a032c11cfc498b0354cb385ad 100644 (file)
@@ -15,8 +15,8 @@
 #include <ctype.h>
 #include <setjmp.h>
 #include <stdlib.h>
-#include "render.h"
-#include "pack.h"
+#include <common/render.h>
+#include <pack/pack.h>
 
 static jmp_buf jbuf;
 
index 215644eec378f9b34d612017242f1d0e080a5aa9..91bc7445e0ced9df06f99b31c9344db876877173 100644 (file)
@@ -19,9 +19,9 @@
 
 #include <math.h>
 #include <assert.h>
-#include "render.h"
-#include "pack.h"
-#include "pointset.h"
+#include <common/render.h>
+#include <pack/pack.h>
+#include <common/pointset.h>
 #include <assert.h>
 
 #define strneq(a,b,n)          (!strncmp(a,b,n))
index 99bc9b3c3050e20439bc53df5c8c146a3018f2c5..2060ba05c439a88282ececbbc3e6f110e8b85c68 100644 (file)
@@ -12,9 +12,9 @@
  *************************************************************************/
 
 #include <assert.h>
-#include "render.h"
-#include "neatoprocs.h"
-#include "pack.h"
+#include <common/render.h>
+#include <neatogen/neatoprocs.h>
+#include <pack/pack.h>
 
 /* Test driver for libpack library.
  * Input consists of graphs in dot format.