[Libreoffice-commits] core.git: RepositoryExternal.mk vcl/Executable_lo_kde5filepicker.mk vcl/Library_vclplug_gtk3_kde5.mk vcl/Library_vclplug_kde5.mk vcl/Library_vclplug_qt5.mk
Michael Weghorn (via logerrit)
logerrit at kemper.freedesktop.org
Sat Jun 8 15:13:52 UTC 2019
RepositoryExternal.mk | 2 +-
vcl/Executable_lo_kde5filepicker.mk | 8 +++-----
vcl/Library_vclplug_gtk3_kde5.mk | 2 +-
vcl/Library_vclplug_kde5.mk | 4 ++--
vcl/Library_vclplug_qt5.mk | 4 ++--
5 files changed, 9 insertions(+), 11 deletions(-)
New commits:
commit 4aa60490622cc10f8d3a31489c62a5622d240c83
Author: Michael Weghorn <m.weghorn at posteo.de>
AuthorDate: Sat Jun 8 13:45:36 2019 +0200
Commit: Michael Weghorn <m.weghorn at posteo.de>
CommitDate: Sat Jun 8 17:12:55 2019 +0200
gbuild: treat $({QT,KF}5_CFLAGS) as cxxflags, not defines
Treat all of QT5_CFLAGS, QT5_GLIB_CFLAGS and KF5_CFLAGS as
C++ flags, since those contain C++ flags in the first place.
Therefore, set them using 'gb_Library_add_cxxflags',
not 'gb_Library_add_defs'.
(Strictly speaking, those variables contain includes as well,
but handling that properly would require splitting this
up further, either in 'configure.ac' or see e.g. how it's done
in 'RepositoryExternal.mk'.)
This also prevents the values of those variables from ending
up in the wrong section in IDE integration generated by
gbuild-to-ide.
Handling them as includes previously resulted e.g. in 'vcl/vcl.pro'
(generated by 'make qtcreator-ide-integration') containing
DEFINES += BOOST_ALL_NO_LIB \
... \
VCLPLUG_GTK3_KDE5_IMPLEMENTATION -isystem /usr/include//KF5 -isystem /usr/include//KF5/KCoreAddons [...]
and Qt Creator would show a (rather unhelpful) warning like the
following when opening a header file inside 'vcl/inc/':
> Warning: The code model could not parse an included file,
> which might lead to incorrect code completion and highlighting,
> for, example.
>
> 4:9: error: macro name must be an identifier
Change-Id: I2bb0c37fdf1112650e8adc712f60737888a8169b
Reviewed-on: https://gerrit.libreoffice.org/73699
Tested-by: Jenkins
Reviewed-by: Michael Weghorn <m.weghorn at posteo.de>
diff --git a/RepositoryExternal.mk b/RepositoryExternal.mk
index b039484338a8..6b0c69b3c804 100644
--- a/RepositoryExternal.mk
+++ b/RepositoryExternal.mk
@@ -3084,7 +3084,7 @@ $(call gb_LinkTarget_set_include,$(1),\
$$(INCLUDE) \
)
-$(call gb_LinkTarget_add_defs,$(1),\
+$(call gb_LinkTarget_add_cxxflags,$(1),\
$(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
)
diff --git a/vcl/Executable_lo_kde5filepicker.mk b/vcl/Executable_lo_kde5filepicker.mk
index f3e940953601..a34682966778 100644
--- a/vcl/Executable_lo_kde5filepicker.mk
+++ b/vcl/Executable_lo_kde5filepicker.mk
@@ -29,6 +29,9 @@ $(eval $(call gb_Executable_set_include,lo_kde5filepicker,\
$(eval $(call gb_Executable_add_cxxflags,lo_kde5filepicker,\
$$(INCLUDE) \
$$(BOOST_CXXFLAGS) \
+ $(QT5_CFLAGS) \
+ $(QT5_GLIB_CFLAGS) \
+ $(KF5_CFLAGS) \
))
$(eval $(call gb_Executable_use_custom_headers,lo_kde5filepicker,\
@@ -69,11 +72,6 @@ $(eval $(call gb_Executable_use_externals,lo_kde5filepicker,\
dbus \
))
-$(eval $(call gb_Executable_add_defs,lo_kde5filepicker,\
- $(QT5_CFLAGS) \
- $(QT5_GLIB_CFLAGS) \
- $(KF5_CFLAGS) \
-))
$(eval $(call gb_Executable_add_libs,lo_kde5filepicker,\
$(QT5_LIBS) \
$(QT5_GLIB_LIBS) \
diff --git a/vcl/Library_vclplug_gtk3_kde5.mk b/vcl/Library_vclplug_gtk3_kde5.mk
index 089d6ee31a1f..cfd370221dde 100644
--- a/vcl/Library_vclplug_gtk3_kde5.mk
+++ b/vcl/Library_vclplug_gtk3_kde5.mk
@@ -35,11 +35,11 @@ $(eval $(call gb_Library_set_include,vclplug_gtk3_kde5,\
$(eval $(call gb_Library_add_cxxflags,vclplug_gtk3_kde5,\
$$(INCLUDE) \
$$(GTK3_CFLAGS) \
+ $(KF5_CFLAGS) \
))
$(eval $(call gb_Library_add_defs,vclplug_gtk3_kde5,\
-DVCLPLUG_GTK_IMPLEMENTATION -DVCLPLUG_GTK3_KDE5_IMPLEMENTATION \
- $(KF5_CFLAGS) \
))
$(eval $(call gb_Library_use_custom_headers,vclplug_gtk3_kde5,\
diff --git a/vcl/Library_vclplug_kde5.mk b/vcl/Library_vclplug_kde5.mk
index d097845bd5ce..181a318ab797 100644
--- a/vcl/Library_vclplug_kde5.mk
+++ b/vcl/Library_vclplug_kde5.mk
@@ -62,7 +62,7 @@ $(eval $(call gb_Library_use_externals,vclplug_kde5,\
))
ifneq ($(QT5_HAVE_GLIB),)
-$(eval $(call gb_Library_add_defs,vclplug_kde5,\
+$(eval $(call gb_Library_add_cxxflags,vclplug_kde5,\
$(QT5_GLIB_CFLAGS) \
))
@@ -71,7 +71,7 @@ $(eval $(call gb_Library_add_libs,vclplug_kde5,\
))
endif
-$(eval $(call gb_Library_add_defs,vclplug_kde5,\
+$(eval $(call gb_Library_add_cxxflags,vclplug_kde5,\
$(KF5_CFLAGS) \
))
$(eval $(call gb_Library_add_libs,vclplug_kde5,\
diff --git a/vcl/Library_vclplug_qt5.mk b/vcl/Library_vclplug_qt5.mk
index 3231672c8743..543a4569ceb9 100644
--- a/vcl/Library_vclplug_qt5.mk
+++ b/vcl/Library_vclplug_qt5.mk
@@ -63,7 +63,7 @@ $(eval $(call gb_Library_use_externals,vclplug_qt5,\
qt5 \
))
-$(eval $(call gb_Library_add_defs,vclplug_qt5,\
+$(eval $(call gb_Library_add_cxxflags,vclplug_qt5,\
$(QT5_CFLAGS) \
))
$(eval $(call gb_Library_add_libs,vclplug_qt5,\
@@ -71,7 +71,7 @@ $(eval $(call gb_Library_add_libs,vclplug_qt5,\
))
ifneq ($(QT5_HAVE_GLIB),)
-$(eval $(call gb_Library_add_defs,vclplug_qt5,\
+$(eval $(call gb_Library_add_cxxflags,vclplug_qt5,\
$(QT5_GLIB_CFLAGS) \
))
$(eval $(call gb_Library_add_libs,vclplug_qt5,\
More information about the Libreoffice-commits
mailing list