Related to #1242 and #1785.
add_definitions(-DGVC_EXPORTS -D_BLD_gvc=1)
-include_directories(
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${CMAKE_CURRENT_BINARY_DIR}
- ${TOP_SOURCE_DIR}
- ${GRAPHVIZ_LIB_DIR}/cdt
- ${GRAPHVIZ_LIB_DIR}/cgraph
- ${GRAPHVIZ_LIB_DIR}/gvc
- ${GRAPHVIZ_LIB_DIR}/label
- ${GRAPHVIZ_LIB_DIR}/pack
- ${GRAPHVIZ_LIB_DIR}/pathplan
- ${GRAPHVIZ_LIB_DIR}/fdpgen
- ${GRAPHVIZ_LIB_DIR}/xdot
-)
-
-if (WIN32)
- include_directories(${WINDOWS_DEPENDENCY_DIR}/include)
-endif()
-
# Generate colortbl.h from sources
add_custom_command(
OUTPUT svgcolor_lib
${BISON_HTMLparse_OUTPUTS}
)
+target_include_directories(common PRIVATE
+ ${GRAPHVIZ_LIB_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${CMAKE_CURRENT_BINARY_DIR}
+ ${GRAPHVIZ_LIB_DIR}/cdt
+ ${GRAPHVIZ_LIB_DIR}/cgraph
+ ${GRAPHVIZ_LIB_DIR}/gvc
+ ${GRAPHVIZ_LIB_DIR}/label
+ ${GRAPHVIZ_LIB_DIR}/pack
+ ${GRAPHVIZ_LIB_DIR}/pathplan
+ ${GRAPHVIZ_LIB_DIR}/fdpgen
+ ${GRAPHVIZ_LIB_DIR}/xdot
+)
+
+if (WIN32)
+ target_include_directories(common PRIVATE ${WINDOWS_DEPENDENCY_DIR}/include)
+endif()
+
# From https://gitlab.com/graphviz/graphviz/-/issues/1613 @mdwies 20093010
if(APPLE)
target_compile_options(common PRIVATE "-fno-common")
## Process this file with automake to produce Makefile.in
AM_CPPFLAGS = \
+ -I$(top_srcdir)/lib \
-I$(top_srcdir)/libltdl \
-I$(top_srcdir)/lib/gvc \
-I$(top_srcdir)/lib/pack \
*/
#include <ctype.h>
-#include "render.h"
-#include "tlayout.h"
-#include "gvc.h"
-#include "fdp.h"
+#include <common/render.h>
+#include <fdpgen/tlayout.h>
+#include <gvc/gvc.h>
+#include <fdpgen/fdp.h>
/* neato_extra_args:
* Handle special neato arguments.
*************************************************************************/
-#include "render.h"
+#include <common/render.h>
#define EPSILON .0001
#include <string.h>
#include <ctype.h>
-#include "arith.h"
-#include "color.h"
-#include "colorprocs.h"
+#include <common/arith.h>
+#include <common/color.h>
+#include <common/colorprocs.h>
#include "colortbl.h"
-#include "memory.h"
-#include "strcasecmp.h"
+#include <common/memory.h>
+#include <cgraph/strcasecmp.h>
static char* colorscheme;
#include "config.h"
-#include "render.h"
+#include <common/render.h>
#include <stdarg.h>
#ifdef HAVE_UNISTD_H
typedef Ppoly_t Ppolyline_t;
#else
-#include "render.h"
-#include "pathplan.h"
+#include <common/render.h>
+#include <pathplan/pathplan.h>
#endif
#define TWOPI (2*M_PI)
#include <string.h>
#include <ctype.h>
#include <locale.h>
-#include "render.h"
-#include "agxbuf.h"
-#include "htmltable.h"
-#include "gvc.h"
-#include "cdt.h"
-#include "xdot.h"
+#include <common/render.h>
+#include <cgraph/agxbuf.h>
+#include <common/htmltable.h>
+#include <gvc/gvc.h>
+#include <cdt/cdt.h>
+#include <xdot/xdot.h>
#ifdef _WIN32
#define strtok_r strtok_s
#include "config.h"
-#include "geom.h"
-#include "geomprocs.h"
+#include <common/geom.h>
+#include <common/geomprocs.h>
#ifdef _WIN32
#define inline
#endif
#include "config.h"
#define EXTERN
-#include "types.h"
-#include "globals.h"
-#include "fdp.h"
+#include <common/types.h>
+#include <common/globals.h>
+#include <fdpgen/fdp.h>
/* Default layout values, possibly set via command line; -1 indicates unset */
static fdpParms_t fdpParms = {
* Use encoded form for polyline and polygon
*/
#include <ctype.h>
-#include "render.h"
+#include <common/render.h>
#define SOLID 0
#define DOTTED 1
*************************************************************************/
-#include "render.h"
-#include "htmltable.h"
+#include <common/render.h>
+#include <common/htmltable.h>
#include "htmlparse.h"
-#include "htmllex.h"
-#include "cdt.h"
+#include <common/htmllex.h>
+#include <cdt/cdt.h>
#include <ctype.h>
-#include "strcasecmp.h"
+#include <cgraph/strcasecmp.h>
#ifdef HAVE_EXPAT
#include <expat.h>
%{
-#include "render.h"
-#include "htmltable.h"
-#include "htmllex.h"
+#include <common/render.h>
+#include <common/htmltable.h>
+#include <common/htmllex.h>
extern int yyparse(void);
*/
#include <assert.h>
-#include "render.h"
-#include "htmltable.h"
-#include "agxbuf.h"
-#include "pointset.h"
-#include "intset.h"
-#include "cdt.h"
-#include "strcasecmp.h"
+#include <common/render.h>
+#include <common/htmltable.h>
+#include <cgraph/agxbuf.h>
+#include <common/pointset.h>
+#include <common/intset.h>
+#include <cdt/cdt.h>
+#include <cgraph/strcasecmp.h>
#define DEFAULT_BORDER 1
#define DEFAULT_CELLPADDING 2
*************************************************************************/
#include <ctype.h>
-#include "render.h"
-#include "htmltable.h"
-#include "gvc.h"
-#include "xdot.h"
-#include "agxbuf.h"
-#include "strcasecmp.h"
+#include <common/render.h>
+#include <common/htmltable.h>
+#include <gvc/gvc.h>
+#include <xdot/xdot.h>
+#include <cgraph/agxbuf.h>
+#include <cgraph/strcasecmp.h>
static char *usageFmt =
"Usage: %s [-Vv?] [-(GNE)name=val] [-(KTlso)<val>] <dot files>\n";
#include "config.h"
#include <stddef.h>
-#include <intset.h>
-#include <memory.h>
+#include <common/intset.h>
+#include <common/memory.h>
static void*
mkIntItem(Dt_t* d,intitem* obj,Dtdisc_t* disc)
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include "agxbuf.h"
-#include "render.h"
-#include "htmltable.h"
+#include <cgraph/agxbuf.h>
+#include <common/render.h>
+#include <common/htmltable.h>
#include <limits.h>
static char *strdup_and_subst_obj0 (char *str, void *obj, int escBackslash);
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "memory.h"
+#include <common/memory.h>
void *zmalloc(size_t nbytes)
{
*************************************************************************/
-#include "render.h"
-#include "strcasecmp.h"
+#include <common/render.h>
+#include <cgraph/strcasecmp.h>
#define NONE 0
#define NODE 1
/* mpgen.c 1999-Feb-23 Jim Hefferon jim@joshua.smcvt.edu
* Adapted from psgen.c. See 1st_read.mp.
*/
-#include "render.h"
+#include <common/render.h>
#ifndef _WIN32
#include <unistd.h>
#endif
* Network Simplex Algorithm for Ranking Nodes of a DAG
*/
-#include "render.h"
+#include <common/render.h>
#include <setjmp.h>
static int init_graph(graph_t *);
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include "render.h"
-#include "agxbuf.h"
+#include <common/render.h>
+#include <cgraph/agxbuf.h>
#include <stdarg.h>
#include <string.h>
*************************************************************************/
-#include "render.h"
+#include <common/render.h>
#define PIC_COORDS_PER_LINE (16) /* to avoid stdio BUF overflow */
*************************************************************************/
-#include "render.h"
-#include "pointset.h"
+#include <common/render.h>
+#include <common/pointset.h>
typedef struct {
Dtlink_t link;
*************************************************************************/
-#include "render.h"
-#include "xlabels.h"
+#include <common/render.h>
+#include <label/xlabels.h>
static int Rankdir;
static boolean Flip;
#include <sys/stat.h>
-#include "render.h"
-#include "gvio.h"
-#include "strcasecmp.h"
+#include <common/render.h>
+#include <gvc/gvio.h>
+#include <cgraph/strcasecmp.h>
static int N_EPSF_files;
static Dict_t *EPSF_contents;
#include "config.h"
-#include "render.h"
+#include <common/render.h>
#include <math.h>
-#include "pathplan.h"
+#include <pathplan/pathplan.h>
#include <setjmp.h>
#include <stdlib.h>
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include "render.h"
-#include "htmltable.h"
+#include <common/render.h>
+#include <common/htmltable.h>
#include <limits.h>
#define RBCONST 12
*/
#include <math.h>
-#include "render.h"
+#include <common/render.h>
#ifdef DEBUG
static int debugleveln(edge_t* e, int i)
#include <stdio.h>
#include <stdlib.h>
#include <types.h>
-#include <memory.h>
-#include <logic.h>
-#include <agxbuf.h>
-#include <utils.h>
+#include <common/memory.h>
+#include <common/logic.h>
+#include <cgraph/agxbuf.h>
+#include <common/utils.h>
/* sample point size; should be dynamic based on dpi or under user control */
#define BEZIERSUBDIVISION 20
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
-#include "cdt.h"
-#include "render.h"
-#include "strcasecmp.h"
+#include <cdt/cdt.h>
+#include <common/render.h>
+#include <cgraph/strcasecmp.h>
static double timesFontWidth[] = {
0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, 0.2500, /* */
#else
#include <time.h>
-#include "render.h"
-#include "utils.h"
+#include <common/render.h>
+#include <common/utils.h>
typedef clock_t mytime_t;
#define GET_TIME(S) S = clock()
* Contributors: See CVS logs. Details at http://www.graphviz.org/
*************************************************************************/
-#include "render.h"
-#include "agxbuf.h"
-#include "htmltable.h"
-#include "entities.h"
-#include "logic.h"
+#include <common/render.h>
+#include <cgraph/agxbuf.h>
+#include <common/htmltable.h>
+#include <common/entities.h>
+#include <common/logic.h>
#include <math.h>
-#include "gvc.h"
-#include "strcasecmp.h"
+#include <gvc/gvc.h>
+#include <cgraph/strcasecmp.h>
#ifdef _WIN32
#define R_OK 4
*/
#define SUPPORT_WRITEDATE
-#include "render.h"
+#include <common/render.h>
#ifdef SUPPORT_WRITEDATE
#include <time.h>
#endif
-#include "strcasecmp.h"
+#include <cgraph/strcasecmp.h>
/* VTX font modifiers */
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<Optimization>Disabled</Optimization>
- <AdditionalIncludeDirectories>$(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\GTK2\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir);$(SolutionDir)lib\ast;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\fdpgen;$(SolutionDir)lib\label;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\gvc;$(SolutionDir)lib\xdot;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\GTK2\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir);$(SolutionDir)lib;$(SolutionDir)lib\ast;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\fdpgen;$(SolutionDir)lib\label;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\gvc;$(SolutionDir)lib\xdot;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_USRDLL;GVC_EXPORTS;WIN32_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<MinimalRebuild>true</MinimalRebuild>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
- <AdditionalIncludeDirectories>$(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\GTK2\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir);$(SolutionDir)lib\ast;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\fdpgen;$(SolutionDir)lib\label;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\gvc;$(SolutionDir)lib\xdot;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
+ <AdditionalIncludeDirectories>$(SolutionDir)windows\include;$(SolutionDir)windows\dependencies\GTK2\include;$(SolutionDir)windows\dependencies\libraries\x86\include;$(SolutionDir);$(SolutionDir)lib;$(SolutionDir)lib\ast;$(SolutionDir)lib\cdt;$(SolutionDir)lib\cgraph;$(SolutionDir)lib\common;$(SolutionDir)lib\fdpgen;$(SolutionDir)lib\label;$(SolutionDir)lib\pathplan;$(SolutionDir)lib\gvc;$(SolutionDir)lib\xdot;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>NDEBUG;_WINDOWS;_USRDLL;GVC_EXPORTS;WIN32_DLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PrecompiledHeader />
<WarningLevel>Level4</WarningLevel>