Related to #1785.
add_definitions(-DEXPORT_CGRAPH -DEXPORT_AGXBUF -DEXPORT_CGHDR -DYY_NO_UNISTD_H)
-include_directories(
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${GRAPHVIZ_LIB_DIR}/cdt
-)
-
add_library(cgraph SHARED
# Header files
agxbuf.h
${FLEX_Scan_OUTPUTS}
)
+target_include_directories(cgraph PRIVATE
+ ${GRAPHVIZ_LIB_DIR}
+ ${GRAPHVIZ_LIB_DIR}/cdt
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+)
+
target_link_libraries(cgraph cdt)
# Installation location of library files
pdfdir = $(pkgdatadir)/doc/pdf
pkgconfigdir = $(libdir)/pkgconfig
-AM_CPPFLAGS = -I$(top_srcdir)/lib/cdt
+AM_CPPFLAGS = -I$(top_srcdir)/lib -I$(top_srcdir)/lib/cdt
pkginclude_HEADERS = cgraph.h strcasecmp.h
noinst_HEADERS = agxbuf.h cghdr.h
*************************************************************************/
#include <stdio.h>
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
#define MAX(a,b) ((a)>(b)?(a):(b))
static agerrlevel_t agerrno; /* Last error level */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include <agxbuf.h>
+#include <cgraph/agxbuf.h>
#define N_GNEW(n,t) (t*)calloc((n),sizeof(t))
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
/* The following functions take a graph and a template (node/edge/graph)
* and return the object representing the template within the local graph.
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
/*
* dynamic attributes
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)lib\cdt</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)lib;$(SolutionDir)lib\cdt</AdditionalIncludeDirectories>
<PreprocessorDefinitions>EXPORT_CGRAPH;EXPORT_AGXBUF;EXPORT_CGHDR;YY_NO_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)lib\cdt</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(ProjectDir);$(SolutionDir)windows\include;$(SolutionDir)lib;$(SolutionDir)lib\cdt</AdditionalIncludeDirectories>
<PreprocessorDefinitions>EXPORT_CGRAPH;EXPORT_AGXBUF;EXPORT_CGHDR;YY_NO_UNISTD_H;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader />
<WarningLevel>Level4</WarningLevel>
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
/*
* provides "compound nodes" on top of base Libgraph.
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
#define IN_SET FALSE
#define OUT_SET TRUE
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include "cghdr.h"
+#include <cgraph/cghdr.h>
static void agflatten_elist(Dict_t * d, Dtlink_t ** lptr, int flag)
{
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
Agraph_t *Ag_G_global;
*************************************************************************/
#include <stdio.h>
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
/* a default ID allocator that works off the shared string lib */
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
typedef struct IMapEntry_s {
Dtlink_t namedict_link;
*************************************************************************/
#include <stdio.h>
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
#if defined(_WIN32)
#include <io.h>
#endif
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
/* memory management discipline and entry points */
static void *memopen(Agdisc_t* disc)
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
Agnode_t *agfindnode_by_id(Agraph_t * g, IDTYPE id)
{
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
int agdelete(Agraph_t * g, void *obj)
{
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
static char DRName[] = "_AG_pending";
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
/*
* run time records
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
/*
* reference counted strings.
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
static Agraph_t *agfindsubg_by_id(Agraph_t * g, IDTYPE id)
{
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include <cghdr.h>
+#include <cgraph/cghdr.h>
static Agraph_t *Ag_dictop_G;
#include <stdio.h> /* need sprintf() */
#include <ctype.h>
-#include "cghdr.h"
-#include "strcasecmp.h"
+#include <cgraph/cghdr.h>
+#include <cgraph/strcasecmp.h>
#define EMPTY(s) ((s == 0) || (s)[0] == '\0')
#define MAX(a,b) ((a)>(b)?(a):(b))