]> granicus.if.org Git - graphviz/commitdiff
disambiguate lib/mingle/*.c #includes
authorMatthew Fernandez <matthew.fernandez@gmail.com>
Wed, 19 Aug 2020 02:42:58 +0000 (19:42 -0700)
committerMatthew Fernandez <matthew.fernandez@gmail.com>
Thu, 10 Sep 2020 02:26:51 +0000 (19:26 -0700)
Related to #1785.

lib/mingle/CMakeLists.txt
lib/mingle/Makefile.am
lib/mingle/agglomerative_bundling.c
lib/mingle/edge_bundling.c
lib/mingle/ink.c
lib/mingle/minglelib.vcxproj
lib/mingle/nearest_neighbor_graph.c

index 9aa9726f9bdc405bf90c17d5cda4d675ade71b8f..39731609afc69d03487368f1de1ce983ac2354b9 100644 (file)
@@ -1,17 +1,5 @@
 if (ANN_FOUND)
 
-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}/pathplan
-    ${GRAPHVIZ_LIB_DIR}/sfdpgen
-    ${GRAPHVIZ_LIB_DIR}/sparse
-    ${ANN_INCLUDE_DIR}
-)
-
 add_library(libmingle STATIC
     # Header files
     agglomerative_bundling.h
@@ -28,4 +16,17 @@ add_library(libmingle STATIC
     nearest_neighbor_graph_ann.cpp
 )
 
+target_include_directories(libmingle 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}/pathplan
+    ${GRAPHVIZ_LIB_DIR}/sfdpgen
+    ${GRAPHVIZ_LIB_DIR}/sparse
+    ${ANN_INCLUDE_DIR}
+)
+
 endif (ANN_FOUND)
index 55d2a6bb13b192ad3ab4dd795e930d03a610c28f..7a5ec484b7072f8327615dc3e1fb74894dd448e4 100644 (file)
@@ -2,6 +2,7 @@
 ## Process this file with automake to produce Makefile.in
 
 AM_CPPFLAGS = \
+       -I$(top_srcdir)/lib \
        -I$(top_srcdir)/lib/common \
        -I$(top_srcdir)/lib/sparse \
        -I$(top_srcdir)/lib/gvc \
index a3bed7f977714f83fb8ffd04519dda485fe46287..984ce5bb7c0a1bfc1da104601be478002bd1e7c2 100644 (file)
@@ -8,21 +8,21 @@
  * Contributors: See CVS logs. Details at http://www.graphviz.org/
  *************************************************************************/
 
-#include "types.h"
-#include "globals.h"
-#include "general.h"
+#include <common/types.h>
+#include <common/globals.h>
+#include <sparse/general.h>
 #include <math.h>
-#include "time.h"
-#include "SparseMatrix.h"
-#include "vector.h"
-#include "edge_bundling.h"
-#include "ink.h"
-#include "agglomerative_bundling.h"
-#include "nearest_neighbor_graph.h"
+#include <time.h>
+#include <sparse/SparseMatrix.h>
+#include <sparse/vector.h>
+#include <mingle/edge_bundling.h>
+#include <mingle/ink.h>
+#include <mingle/agglomerative_bundling.h>
+#include <mingle/nearest_neighbor_graph.h>
 #include <string.h>
 
 #if OPENGL
-#include "gl.h"
+#include <gl.h>
 extern pedge *edges_global;
 extern int nedges_global;
 #endif
index fb3d5c18309c885ea599bf90640be499748e5615..e708ddb0ac2a57ba43d74f66b7011f0c6eda1224 100644 (file)
 
 #include "config.h"
 
-#include "types.h"
-#include "globals.h"
-#include "general.h"
+#include <common/types.h>
+#include <common/globals.h>
+#include <sparse/general.h>
 #include <math.h>
-#include "SparseMatrix.h"
-#include "edge_bundling.h"
+#include <sparse/SparseMatrix.h>
+#include <mingle/edge_bundling.h>
 #include <time.h>
-#include "clustering.h"
-#include "ink.h"
-#include "agglomerative_bundling.h"
+#include <sparse/clustering.h>
+#include <mingle/ink.h>
+#include <mingle/agglomerative_bundling.h>
 #include <string.h>
 
 #define SMALL 1.e-10
 
 #ifdef OPENGL
-#include "gl.h"
+#include <gl.h>
 extern pedge *edges_global;
 extern int *clusters_global;
 #endif
index c4c4f9e10f36f054d9af5a786a001ae005f068a0..fb9bbe03aed66371642f639a1f5368ac93982305 100644 (file)
 
 #include <math.h>
 #include <stdlib.h>
-#include "types.h"
-#include "globals.h"
-#include "general.h"
-#include "SparseMatrix.h"
-#include "edge_bundling.h"
-#include "ink.h"
+#include <common/types.h>
+#include <common/globals.h>
+#include <sparse/general.h>
+#include <sparse/SparseMatrix.h>
+#include <mingle/edge_bundling.h>
+#include <mingle/ink.h>
 
 double ink_count;
 
index 836ad60b4741d5c25a2403b7fc05beaf4ecf8e65..2b0105286196fc1e81a75144a95690b29eddf044 100644 (file)
@@ -54,7 +54,7 @@
   <ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
     <ClCompile>
       <Optimization>Disabled</Optimization>
-      <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\gvc;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\sparse;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir)lib;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\gvc;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\sparse;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>_DEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <MinimalRebuild>true</MinimalRebuild>
       <BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@@ -80,7 +80,7 @@
     <ClCompile>
       <Optimization>MaxSpeed</Optimization>
       <IntrinsicFunctions>true</IntrinsicFunctions>
-      <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\gvc;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\sparse;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+      <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir)lib;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\gvc;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\sparse;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
       <PreprocessorDefinitions>NDEBUG;_LIB;%(PreprocessorDefinitions)</PreprocessorDefinitions>
       <FunctionLevelLinking>true</FunctionLevelLinking>
       <PrecompiledHeader />
index 8d09aa2497babccf47cd3d49f13052ed25eb7d1d..a018cae4afca57645175ea5fa7a5dbae344f6e15 100644 (file)
 
 #include "config.h"
 
-#include "general.h"
-#include "SparseMatrix.h"
-#include "nearest_neighbor_graph_ann.h"
-#include "nearest_neighbor_graph.h"
+#include <sparse/general.h>
+#include <sparse/SparseMatrix.h>
+#include <mingle/nearest_neighbor_graph_ann.h>
+#include <mingle/nearest_neighbor_graph.h>
 
 SparseMatrix nearest_neighbor_graph(int nPts, int num_neigbors, int dim, double *x, double eps){
   /* Gives a nearest neighbor graph of a list of dim-dimendional points. The result is a sparse matrix