diff options
author | Michael Weghorn <m.weghorn@posteo.de> | 2019-10-17 14:18:20 +0200 |
---|---|---|
committer | Michael Weghorn <m.weghorn@posteo.de> | 2019-10-17 16:04:19 +0200 |
commit | 24004cdf9e2582d429b8987a40eb82af6926013c (patch) | |
tree | f564d0d037d95dc3f49f8548a8c19901f83c841d | |
parent | 556832332ce2e26ec727d6dffebefe53786f84cd (diff) |
gbuild: Treat 'DBUS_GLIB_CFLAGS' as includes, not defines
Since that variable holds the relevant includes, using
'gb_LinkTarget_set_include' makes sure that those
flags end up in the correct section, e.g. when generating
IDE integration using 'gbuild-to-ide'.
E.g. for the 'qtcreator-ide-integraton' make target, this
makes sure that they end up in the 'INCLUDES' section in
'sd/sd.pro' and not the 'DEFINES' section, which previously
led to an "error: macro name must be an identifier" being
shown when editing files underneath 'sd/' in Qt Creator with
the Clang Code Model plugin enabled, s.a. commit
4aa60490622cc10f8d3a31489c62a5622d240c83
("gbuild: treat $({QT,KF}5_CFLAGS) as cxxflags, not defines").
Corresponding entry in my config_host.mk.in on Debian
bullseye/testing:
export DBUS_GLIB_CFLAGS=$(gb_SPACE)-I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include
Change-Id: I9af9a58fdc05ce6648221c00a20859be777843f9
Reviewed-on: https://gerrit.libreoffice.org/80944
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn@posteo.de>
-rw-r--r-- | sd/CppunitTest_sd_uimpress.mk | 3 | ||||
-rw-r--r-- | sd/Library_sd.mk | 3 |
2 files changed, 4 insertions, 2 deletions
diff --git a/sd/CppunitTest_sd_uimpress.mk b/sd/CppunitTest_sd_uimpress.mk index 94229cc2c8e3..93426dfc3a55 100644 --- a/sd/CppunitTest_sd_uimpress.mk +++ b/sd/CppunitTest_sd_uimpress.mk @@ -80,7 +80,8 @@ $(eval $(call gb_CppunitTest_use_externals,sd_uimpress,\ )) ifneq ($(DBUS_HAVE_GLIB),) -$(eval $(call gb_CppunitTest_add_defs,sd_uimpress,\ +$(eval $(call gb_CppunitTest_set_include,sd_uimpress,\ + $$(INCLUDE) \ $(DBUS_GLIB_CFLAGS) \ )) $(eval $(call gb_CppunitTest_add_libs,sd_uimpress,\ diff --git a/sd/Library_sd.mk b/sd/Library_sd.mk index e8afd204c308..410f3c782b29 100644 --- a/sd/Library_sd.mk +++ b/sd/Library_sd.mk @@ -110,7 +110,8 @@ $(eval $(call gb_Library_use_externals,sd,\ )) ifneq ($(DBUS_HAVE_GLIB),) -$(eval $(call gb_Library_add_defs,sd,\ +$(eval $(call gb_Library_set_include,sd,\ + $$(INCLUDE) \ $(DBUS_GLIB_CFLAGS) \ )) $(eval $(call gb_Library_add_libs,sd,\ |