Only pass -I... arguments to g-ir-scanner by using pkg-config's --cflags-only-I

Otherwise it is possible that e.g. -Wl,--export-dynamic is passed which is fatal.

Change-Id: I1735641e3149c86456e1164b67509a719e09d446
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/154340
Reviewed-by: René Engelhard <rene@debian.org>
Tested-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
This commit is contained in:
Rico Tzschichholz 2023-07-11 20:21:15 +02:00 committed by Caolán McNamara
parent 65c91bd5aa
commit caddaaa6af

View file

@ -167,7 +167,7 @@ $(share_WORKDIR)/%/LOKDocView-0.1.gir: \
mkdir -p $(dir $@)
PYTHONWARNINGS=default g-ir-scanner "${SRCDIR}/include/LibreOfficeKit/LibreOfficeKitGtk.h" \
"${SRCDIR}/libreofficekit/source/gtk/lokdocview.cxx" \
`${PKG_CONFIG} --cflags gobject-introspection-1.0 gtk+-3.0` \
`${PKG_CONFIG} --cflags-only-I gobject-introspection-1.0 gtk+-3.0` \
-I"${SRCDIR}/include/" \
--include=GLib-2.0 --include=GObject-2.0 --include=Gio-2.0 \
--library=libreofficekitgtk --library-path="${INSTDIR}/program" \