At this revision
(https://github.com/LibreOffice/online/tree/341c9dcc96dcf84cadfabcce2c3eabc09c1bf8d1/bundled/include/LibreOfficeKit),
I can’t generate bindings for Rust from LibreOfficeKit header files. The
reason is that I have no way to specify include paths while the
LibreOfficeKit header files assume their sibling header files are to be
found in the system include paths, based on the `< >` include directive
syntax. I think that’s incorrect since LibreOfficeKit is a unit itself;
all header files are supposed to be adjacent in the same directory tree.
I found support for my view in this previous discussion
(https://lists.freedesktop.org/archives/libreoffice/2017-October/078601.html).
I propose the attached patch. With it, generating Rust bindings for
LibreOfficeKit has been tested to succeed.
diff --git a/include/LibreOfficeKit/LibreOfficeKit.h b/include/LibreOfficeKit/LibreOfficeKit.h
index ebc112fb7..5b8fdf1a3 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.h
+++ b/include/LibreOfficeKit/LibreOfficeKit.h
@@ -21,7 +21,7 @@
# include <stdint.h>
#endif
-#include <LibreOfficeKit/LibreOfficeKitTypes.h>
+#include "LibreOfficeKitTypes.h"
#ifdef __cplusplus
extern "C"
diff --git a/include/LibreOfficeKit/LibreOfficeKit.hxx b/include/LibreOfficeKit/LibreOfficeKit.hxx
index 098356089..87a8af01c 100644
--- a/include/LibreOfficeKit/LibreOfficeKit.hxx
+++ b/include/LibreOfficeKit/LibreOfficeKit.hxx
@@ -12,8 +12,8 @@
#include <cstddef>
-#include <LibreOfficeKit/LibreOfficeKit.h>
-#include <LibreOfficeKit/LibreOfficeKitInit.h>
+#include "LibreOfficeKit.h"
+#include "LibreOfficeKitInit.h"
/*
* The reasons this C++ code is not as pretty as it could be are:
diff --git a/include/LibreOfficeKit/LibreOfficeKitGtk.h b/include/LibreOfficeKit/LibreOfficeKitGtk.h
index fb18aae8a..e9201edb4 100644
--- a/include/LibreOfficeKit/LibreOfficeKitGtk.h
+++ b/include/LibreOfficeKit/LibreOfficeKitGtk.h
@@ -13,7 +13,7 @@
#include <gtk/gtk.h>
#include <gdk/gdk.h>
-#include <LibreOfficeKit/LibreOfficeKit.h>
+#include "LibreOfficeKit.h"
G_BEGIN_DECLS
diff --git a/include/LibreOfficeKit/LibreOfficeKitInit.h b/include/LibreOfficeKit/LibreOfficeKitInit.h
index ce5054ac9..550349532 100644
--- a/include/LibreOfficeKit/LibreOfficeKitInit.h
+++ b/include/LibreOfficeKit/LibreOfficeKitInit.h
@@ -10,7 +10,7 @@
#ifndef INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITINIT_H
#define INCLUDED_LIBREOFFICEKIT_LIBREOFFICEKITINIT_H
-#include <LibreOfficeKit/LibreOfficeKit.h>
+#include "LibreOfficeKit.h"
#ifdef __cplusplus
extern "C"
_______________________________________________
LibreOffice mailing list
LibreOffice@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice