From 4aa60490622cc10f8d3a31489c62a5622d240c83 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Sat, 8 Jun 2019 13:45:36 +0200 Subject: 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 --- vcl/Executable_lo_kde5filepicker.mk | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'vcl/Executable_lo_kde5filepicker.mk') 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) \ -- cgit