Related to #1242 and #1785.
add_definitions(-D_BLD_gvc=1 -DGVC_EXPORTS -DGVLIBDIR="${LIBRARY_INSTALL_DIR}/graphviz")
-include_directories(
- ${CMAKE_CURRENT_SOURCE_DIR}
- ${TOP_SOURCE_DIR}
- ${GRAPHVIZ_LIB_DIR}/ast
- ${GRAPHVIZ_LIB_DIR}/cdt
- ${GRAPHVIZ_LIB_DIR}/cgraph
- ${GRAPHVIZ_LIB_DIR}/common
- ${GRAPHVIZ_LIB_DIR}/pathplan
- ${LTDL_INCLUDE_DIRS}
- ${RxSpencer_INCLUDE_DIRS}
-)
-
add_library(gvc SHARED
# Header files
gvc.h
gvc.def
)
+target_include_directories(gvc PRIVATE
+ ${GRAPHVIZ_LIB_DIR}
+ ${CMAKE_CURRENT_SOURCE_DIR}
+ ${TOP_SOURCE_DIR}
+ ${GRAPHVIZ_LIB_DIR}/ast
+ ${GRAPHVIZ_LIB_DIR}/cdt
+ ${GRAPHVIZ_LIB_DIR}/cgraph
+ ${GRAPHVIZ_LIB_DIR}/common
+ ${GRAPHVIZ_LIB_DIR}/pathplan
+ ${LTDL_INCLUDE_DIRS}
+ ${RxSpencer_INCLUDE_DIRS}
+)
+
target_link_libraries(gvc
cdt
cgraph
pkgconfigdir = $(libdir)/pkgconfig
AM_CPPFLAGS = \
+ -I$(top_srcdir)/lib \
-I$(top_srcdir)/lib/common \
-I$(top_srcdir)/lib/pathplan \
-I$(top_srcdir)/lib/cgraph \
#include "config.h"
-#include "gvc.h"
-#include "const.h"
-#include "gvcjob.h"
-#include "gvcint.h"
-#include "gvcproc.h"
-#include "gvconfig.h"
-#include "gvio.h"
+#include <gvc/gvc.h>
+#include <common/const.h>
+#include <gvc/gvcjob.h>
+#include <gvc/gvcint.h>
+#include <gvc/gvcproc.h>
+#include <gvc/gvconfig.h>
+#include <gvc/gvio.h>
#include <stdlib.h>
GVC_t *gvContext(void)
#include "config.h"
-#include "gvconfig.h"
+#include <gvc/gvconfig.h>
#include <string.h>
#include <regex.h>
#include <mach-o/dyld.h>
#endif
-#include "memory.h"
-#include "const.h"
-#include "types.h"
+#include <common/memory.h>
+#include <common/const.h>
+#include <common/types.h>
-#include "gvplugin.h"
-#include "gvcjob.h"
-#include "gvcint.h"
-#include "gvcproc.h"
+#include <gvc/gvplugin.h>
+#include <gvc/gvcjob.h>
+#include <gvc/gvcint.h>
+#include <gvc/gvcproc.h>
/* FIXME */
extern Dt_t * textfont_dict_open(GVC_t *gvc);
#include <stdlib.h>
#include "builddate.h"
-#include "types.h"
-#include "gvplugin.h"
-#include "gvcjob.h"
-#include "gvcint.h"
-#include "gvcproc.h"
-#include "gvc.h"
+#include <common/types.h>
+#include <gvc/gvplugin.h>
+#include <gvc/gvcjob.h>
+#include <gvc/gvcint.h>
+#include <gvc/gvcproc.h>
+#include <gvc/gvc.h>
/* from common/utils.c */
extern void *zmalloc(size_t);
static uint64_t crc;
#endif /* HAVE_LIBZ */
-#include "const.h"
-#include "memory.h"
-#include "gvplugin_device.h"
-#include "gvcjob.h"
-#include "gvcint.h"
-#include "gvcproc.h"
-#include "logic.h"
-#include "gvio.h"
+#include <common/const.h>
+#include <common/memory.h>
+#include <gvc/gvplugin_device.h>
+#include <gvc/gvcjob.h>
+#include <gvc/gvcint.h>
+#include <gvc/gvcproc.h>
+#include <common/logic.h>
+#include <gvc/gvio.h>
static const int PAGE_ALIGN = 4095; /* align to a 4K boundary (less one), typical for Linux, Mac OS X and Windows memory allocation */
#include <stdlib.h>
#include <math.h>
-#include "gvplugin_layout.h"
-#include "gvcint.h"
-#include "gvcproc.h"
+#include <gvc/gvplugin_layout.h>
+#include <gvc/gvcint.h>
+#include <gvc/gvcproc.h>
extern char *strdup_and_subst_obj(char *str, void * n);
extern void emit_graph(GVJ_t * job, graph_t * g);
#include "config.h"
-#include "memory.h"
-#include "types.h"
-#include "gvplugin.h"
-#include "gvcjob.h"
-#include "gvcint.h"
-#include "gvcproc.h"
+#include <common/memory.h>
+#include <common/types.h>
+#include <gvc/gvplugin.h>
+#include <gvc/gvcjob.h>
+#include <gvc/gvcint.h>
+#include <gvc/gvcproc.h>
static GVJ_t *output_filename_job;
static GVJ_t *output_langname_job;
#include "config.h"
-#include "const.h"
-#include "gvplugin_layout.h"
-#include "gvcint.h"
-#include "cgraph.h"
-#include "gvcproc.h"
-#include "gvc.h"
+#include <common/const.h>
+#include <gvc/gvplugin_layout.h>
+#include <gvc/gvcint.h>
+#include <cgraph/cgraph.h>
+#include <gvc/gvcproc.h>
+#include <gvc/gvc.h>
extern void graph_init(Agraph_t *g, boolean use_rankdir);
extern void graph_cleanup(Agraph_t *g);
#include <string.h>
-#include "const.h"
-#include "gvplugin_loadimage.h"
-#include "gvcint.h"
-#include "gvcproc.h"
+#include <common/const.h>
+#include <gvc/gvplugin_loadimage.h>
+#include <gvc/gvcint.h>
+#include <gvc/gvcproc.h>
/* for agerr() */
-#include "cgraph.h"
+#include <cgraph/cgraph.h>
static int gvloadimage_select(GVJ_t * job, char *str)
{
#include <ltdl.h>
#endif
-#include <agxbuf.h>
-#include "memory.h"
-#include "types.h"
-#include "gvplugin.h"
-#include "gvcjob.h"
-#include "gvcint.h"
-#include "gvcproc.h"
-#include "gvio.h"
-
-#include "const.h"
-#include "strcasecmp.h"
+#include <cgraph/agxbuf.h>
+#include <common/memory.h>
+#include <common/types.h>
+#include <gvc/gvplugin.h>
+#include <gvc/gvcjob.h>
+#include <gvc/gvcint.h>
+#include <gvc/gvcproc.h>
+#include <gvc/gvio.h>
+
+#include <common/const.h>
+#include <cgraph/strcasecmp.h>
#ifdef _WIN32
#define strdup(x) _strdup(x)
#include "config.h"
#include <string.h>
-#include "memory.h"
-#include "const.h"
-#include "macros.h"
-#include "colorprocs.h"
-#include "gvplugin_render.h"
-#include "cgraph.h"
-#include "gvcint.h"
-#include "geom.h"
-#include "geomprocs.h"
-#include "gvcproc.h"
-#include "strcasecmp.h"
+#include <common/memory.h>
+#include <common/const.h>
+#include <common/macros.h>
+#include <common/colorprocs.h>
+#include <gvc/gvplugin_render.h>
+#include <cgraph/cgraph.h>
+#include <gvc/gvcint.h>
+#include <common/geom.h>
+#include <common/geomprocs.h>
+#include <gvc/gvcproc.h>
+#include <cgraph/strcasecmp.h>
extern int emit_once(char *str);
extern shape_desc *find_user_shape(char *name);
#include "config.h"
-#include "const.h"
-#include "gvplugin_textlayout.h"
-#include "gvcint.h"
-#include "gvcproc.h"
+#include <common/const.h>
+#include <gvc/gvplugin_textlayout.h>
+#include <gvc/gvcint.h>
+#include <gvc/gvcproc.h>
int gvtextlayout_select(GVC_t * gvc)
{
#include "config.h"
#include <stdio.h>
-#include "cgraph.h"
-#include "gvc.h"
+#include <cgraph/cgraph.h>
+#include <gvc/gvc.h>
typedef struct {
Agrec_t h;
#endif
#include <regex.h>
-#include "types.h"
-#include "logic.h"
-#include "memory.h"
-#include "agxbuf.h"
+#include <common/types.h>
+#include <common/logic.h>
+#include <common/memory.h>
+#include <cgraph/agxbuf.h>
#define _BLD_gvc 1
-#include "utils.h"
-#include "gvplugin_loadimage.h"
+#include <common/utils.h>
+#include <gvc/gvplugin_loadimage.h>
extern char *Gvimagepath;
extern char *HTTPServerEnVar;