[librsvg: 2/5] Use #include <librsvg/blah.h> in rsvg.h




commit 7d032cb807b90fcb56fa6b378a6e628307c70989
Author: Federico Mena Quintero <federico gnome org>
Date:   Thu Nov 5 17:31:59 2020 -0600

    Use #include <librsvg/blah.h> in rsvg.h
    
    This way we can avoid -I$(top_builddir)/include/librsvg everywhere
    just so that header can pick up rsvg-version.h, the only generated
    header file.
    
    Also, it seems more correct, e.g. GTK does it that way?

 Makefile.am                   | 4 +---
 doc/Makefile.am               | 2 +-
 gdk-pixbuf-loader/Makefile.am | 2 --
 gdk-pixbuf-loader/io-svg.c    | 2 +-
 include/librsvg/rsvg.h        | 6 +++---
 tests/api.c                   | 2 +-
 6 files changed, 7 insertions(+), 11 deletions(-)
---
diff --git a/Makefile.am b/Makefile.am
index 3e8d113a..668030b2 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -196,7 +196,6 @@ librsvg_@RSVG_API_MAJOR_VERSION@_la_CPPFLAGS = \
        -I$(top_srcdir)                         \
        -I$(top_builddir)                       \
        -I$(top_builddir)/include               \
-       -I$(top_builddir)/include/librsvg       \
        -DG_LOG_DOMAIN=\"librsvg\"              \
        -DLIBRSVG_DATADIR="\"$(datadir)\""      \
        -DSRCDIR=\""${abs_top_srcdir}"\"        \
@@ -236,7 +235,6 @@ rsvg_convert_CPPFLAGS = \
        -I$(top_srcdir)/include                 \
        -I$(top_builddir)                       \
        -I$(top_builddir)/include               \
-       -I$(top_builddir)/include/librsvg       \
        -DLIBRSVG_DATADIR="\"$(datadir)\""      \
        $(AM_CPPFLAGS)
 
@@ -303,7 +301,7 @@ Rsvg_@RSVG_API_VERSION_U@_gir_PACKAGES = \
        pango \
        libxml-2.0 \
        $(NULL)
-Rsvg_@RSVG_API_VERSION_U@_gir_CFLAGS = -I$(top_builddir) -I$(top_builddir)/include 
-I$(top_builddir)/include/librsvg -DRSVG_COMPILATION
+Rsvg_@RSVG_API_VERSION_U@_gir_CFLAGS = -I$(top_srcdir)/include -I$(top_builddir) -I$(top_builddir)/include 
-DRSVG_COMPILATION
 Rsvg_@RSVG_API_VERSION_U@_gir_LIBS = librsvg-@RSVG_API_MAJOR_VERSION@.la
 Rsvg_@RSVG_API_VERSION_U@_gir_SCANNERFLAGS = --c-include="librsvg/rsvg.h"
 
diff --git a/doc/Makefile.am b/doc/Makefile.am
index a9c92872..710c0d1b 100644
--- a/doc/Makefile.am
+++ b/doc/Makefile.am
@@ -19,7 +19,7 @@ DOC_MAIN_SGML_FILE = $(DOC_MODULE)-docs.xml
 # gtk-doc will search all .c & .h files beneath here for inline comments
 # documenting the functions and macros.
 # e.g. DOC_SOURCE_DIR=../../../gtk
-DOC_SOURCE_DIR = $(abs_top_srcdir)/include
+DOC_SOURCE_DIR = $(abs_top_srcdir)/include/librsvg
 
 # Extra options to pass to gtkdoc-scangobj. Not normally needed.
 SCANGOBJ_OPTIONS = --type-init-func="g_type_init ()"
diff --git a/gdk-pixbuf-loader/Makefile.am b/gdk-pixbuf-loader/Makefile.am
index b71801c8..12280112 100644
--- a/gdk-pixbuf-loader/Makefile.am
+++ b/gdk-pixbuf-loader/Makefile.am
@@ -12,7 +12,6 @@ libpixbufloader_svg_la_CPPFLAGS = \
        -I$(top_srcdir)/include                 \
        -I$(top_builddir)                       \
        -I$(top_builddir)/include               \
-       -I$(top_builddir)/include/librsvg       \
        -DGDK_PIXBUF_ENABLE_BACKEND             \
        -DG_LOG_DOMAIN=\"libpixbufloader-svg\"  \
        $(AM_CPPFLAGS)
@@ -43,7 +42,6 @@ rsvg_loader_CPPFLAGS = \
        -I$(top_srcdir)/include                 \
        -I$(top_builddir)                       \
        -I$(top_builddir)/include               \
-       -I$(top_builddir)/include/librsvg       \
        $(AM_CPPFLAGS)
 rsvg_loader_CFLAGS = \
        $(GDK_PIXBUF_CFLAGS) \
diff --git a/gdk-pixbuf-loader/io-svg.c b/gdk-pixbuf-loader/io-svg.c
index a8577d0b..99d5bcaa 100644
--- a/gdk-pixbuf-loader/io-svg.c
+++ b/gdk-pixbuf-loader/io-svg.c
@@ -28,7 +28,7 @@
 
 #include <stdlib.h>
 
-#include "librsvg/rsvg.h"
+#include <librsvg/rsvg.h>
 #include <gdk-pixbuf/gdk-pixbuf.h>
 
 #define N_(string) (string)
diff --git a/include/librsvg/rsvg.h b/include/librsvg/rsvg.h
index 11b02931..80005887 100644
--- a/include/librsvg/rsvg.h
+++ b/include/librsvg/rsvg.h
@@ -1453,9 +1453,9 @@ const char *rsvg_handle_get_metadata (RsvgHandle *handle);
 
 G_END_DECLS
 
-#include "rsvg-features.h"
-#include "rsvg-version.h"
-#include "rsvg-cairo.h"
+#include <librsvg/rsvg-features.h>
+#include <librsvg/rsvg-version.h>
+#include <librsvg/rsvg-cairo.h>
 
 #undef __RSVG_RSVG_H_INSIDE__
 
diff --git a/tests/api.c b/tests/api.c
index d4f53b88..d84e1d05 100644
--- a/tests/api.c
+++ b/tests/api.c
@@ -17,7 +17,7 @@
 #include <cairo.h>
 
 #define RSVG_DISABLE_DEPRECATION_WARNINGS /* so we can test deprecated API */
-#include "librsvg/rsvg.h"
+#include <librsvg/rsvg.h>
 #include "test-utils.h"
 
 /*


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]