Kaydet (Commit) 4d78cf97 authored tarafından Milian Wolff's avatar Milian Wolff Kaydeden (comit) Thorsten Behrens

Extend build system to support linking against KDE Frameworks 5

Pass --enable-kde5 to autogen.sh to enable this feature. Then
add kde5 to the list of externals to link against KF5. I will
introduce other code that depends on KF5 though which will
leverage this feature.

Change-Id: I17e434a53ac769000b0f805b1f41cdc5c2c84ee2
Reviewed-on: https://gerrit.libreoffice.org/47715Tested-by: 's avatarJenkins <ci@libreoffice.org>
Reviewed-by: 's avatarThorsten Behrens <Thorsten.Behrens@CIB.de>
üst f74cec24
......@@ -299,6 +299,7 @@ $(eval $(call gb_Helper_register_libraries_for_install,OOOLIBS,kde, \
$(if $(ENABLE_KDE4),kde4be1) \
$(if $(USING_X11), \
$(if $(ENABLE_KDE4),vclplug_kde4) \
$(if $(ENABLE_KDE5),vclplug_kde5) \
$(if $(ENABLE_QT5),vclplug_qt5) \
) \
))
......
......@@ -3066,6 +3066,41 @@ endef
endif # ENABLE_KDE4
ifeq ($(ENABLE_KDE5),TRUE)
define gb_LinkTarget__use_kde5
$(call gb_LinkTarget_set_include,$(1),\
$(subst -isystem/,-isystem /,$(filter -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS)))) \
$$(INCLUDE) \
)
$(call gb_LinkTarget_add_defs,$(1),\
$(filter-out -I% -isystem%,$(subst -isystem /,-isystem/,$(KF5_CFLAGS))) \
)
$(call gb_LinkTarget_add_libs,$(1),\
$(KF5_LIBS) \
)
ifeq ($(COM),GCC)
$(call gb_LinkTarget_add_cxxflags,$(1),\
-Wno-shadow \
)
endif
endef
else # !ENABLE_KDE5
define gb_LinkTarget__use_kde5
endef
endif # ENABLE_KDE5
ifeq ($(ENABLE_QT5),TRUE)
define gb_LinkTarget__use_qt5
......
......@@ -157,6 +157,7 @@ export ENABLE_PCH=@ENABLE_PCH@
export ENABLE_PDFIMPORT=@ENABLE_PDFIMPORT@
export ENABLE_PDFIUM=@ENABLE_PDFIUM@
export ENABLE_QT5=@ENABLE_QT5@
export ENABLE_KDE5=@ENABLE_KDE5@
export ENABLE_RANDR=@ENABLE_RANDR@
export ENABLE_RELEASE_BUILD=@ENABLE_RELEASE_BUILD@
export ENABLE_REPORTBUILDER=@ENABLE_REPORTBUILDER@
......@@ -299,6 +300,9 @@ export KDE4_GLIB_LIBS=$(gb_SPACE)@KDE4_GLIB_LIBS@
export KDE4_HAVE_GLIB=@KDE4_HAVE_GLIB@
export KF5_CFLAGS=$(gb_SPACE)@KF5_CFLAGS@
export KF5_LIBS=$(gb_SPACE)@KF5_LIBS@
export KF5_GLIB_CFLAGS=$(gb_SPACE)@KF5_GLIB_CFLAGS@
export KF5_GLIB_LIBS=$(gb_SPACE)@KF5_GLIB_LIBS@
export KF5_HAVE_GLIB=@KF5_HAVE_GLIB@
export KRB5_LIBS=@KRB5_LIBS@
export LCMS2_CFLAGS=$(gb_SPACE)@LCMS2_CFLAGS@
export LCMS2_LIBS=$(gb_SPACE)@LCMS2_LIBS@
......
/*
Settings for KDE5 integration.
*/
#ifndef CONFIG_KDE5_H
#define CONFIG_KDE5_H
#define KDE5_HAVE_GLIB 0
#endif
......@@ -9,5 +9,6 @@ Settings about which X11 desktops have support enabled.
#define ENABLE_GTK 0
#define ENABLE_KDE4 0
#define ENABLE_KDE5 0
#endif
......@@ -593,6 +593,7 @@ linux-gnu*|k*bsd*-gnu*)
build_gstreamer_1_0=yes
build_gstreamer_0_10=yes
test_kde4=yes
test_kde5=yes
test_qt5=yes
if test "$enable_fuzzers" != yes; then
test_freetype=yes
......@@ -688,6 +689,7 @@ freebsd*)
build_gstreamer_1_0=yes
build_gstreamer_0_10=yes
test_kde4=yes
test_kde5=yes
test_qt5=yes
test_freetype=yes
AC_MSG_CHECKING([the FreeBSD operating system release])
......@@ -717,6 +719,7 @@ freebsd*)
build_gstreamer_1_0=yes
build_gstreamer_0_10=yes
test_kde4=yes
test_kde5=yes
test_qt5=yes
test_freetype=yes
PTHREAD_LIBS="-pthread -lpthread"
......@@ -743,6 +746,7 @@ dragonfly*)
build_gstreamer_1_0=yes
build_gstreamer_0_10=yes
test_kde4=yes
test_kde5=yes
test_qt5=yes
test_freetype=yes
PTHREAD_LIBS="-pthread"
......@@ -767,6 +771,7 @@ linux-android*)
test_freetype=no
test_gtk=no
test_kde4=no
test_kde5=no
test_qt5=no
test_randr=no
test_xrender=no
......@@ -1216,6 +1221,12 @@ AC_ARG_ENABLE(qt5,
available.]),
,)
AC_ARG_ENABLE(kde5,
AS_HELP_STRING([--enable-kde5],
[Determines whether to use Qt5/KF5 vclplug on platforms where Qt5 and
KF5 are available.]),
,)
libo_FUZZ_ARG_ENABLE(gui,
AS_HELP_STRING([--disable-gui],
[Disable use of X11 or Wayland to reduce dependencies. Not related to the --headless
......@@ -4529,6 +4540,7 @@ if test "$USING_X11" != TRUE; then
build_gstreamer_1_0=no
build_gstreamer_0_10=no
test_kde4=no
test_kde5=no
test_qt5=no
enable_cairo_canvas=no
fi
......@@ -9777,6 +9789,14 @@ if test "x$enable_qt5" = "xyes"; then
fi
AC_SUBST(ENABLE_QT5)
ENABLE_KDE5=""
if test "x$enable_kde5" = "xyes"; then
ENABLE_KDE5="TRUE"
AC_DEFINE(ENABLE_KDE5)
R="$R kde5"
fi
AC_SUBST(ENABLE_KDE5)
build_vcl_plugins="$R"
if test -z "$build_vcl_plugins"; then
build_vcl_plugins="none"
......@@ -10874,13 +10894,13 @@ KF5_CONFIG="kf5-config"
if test \( "$test_kde5" = "yes" -a "$ENABLE_KDE5" = "TRUE" \) -o \
\( "$test_kf5" = "yes" -a "$ENABLE_KF5" = "TRUE" \)
then
kf5_incdirs="$KF5INC /usr/include /usr/include/KF5 $x_includes"
kf5_incdirs="$KF5INC /usr/include/ $x_includes"
kf5_libdirs="$KF5LIB /usr/lib /usr/lib/kf5 /usr/lib/kf5/devel $x_libraries"
if test -n "$supports_multilib"; then
kf5_libdirs="$kf5_libdirs /usr/lib64 /usr/lib64/kf5 /usr/lib64/kf5/devel"
fi
kf5_test_include="kcoreaddons_version.h"
kf5_test_include="KF5/kcoreaddons_version.h"
kf5_test_library="libKF5CoreAddons.so"
kf5_libdirs="$qt5_libdir $kf5_libdirs"
......@@ -10896,7 +10916,7 @@ then
kf5_incdir="no"
for kf5_check in $kf5_incdirs; do
if test -r "$kf5_check/$kf5_test_include"; then
kf5_incdir="$kf5_check"
kf5_incdir="$kf5_check/KF5"
break
fi
done
......@@ -12492,6 +12512,7 @@ AC_CONFIG_HEADERS([config_host/config_locales.h])
AC_CONFIG_HEADERS([config_host/config_mpl.h])
AC_CONFIG_HEADERS([config_host/config_kde4.h])
AC_CONFIG_HEADERS([config_host/config_qt5.h])
AC_CONFIG_HEADERS([config_host/config_kde5.h])
AC_CONFIG_HEADERS([config_host/config_oox.h])
AC_CONFIG_HEADERS([config_host/config_options.h])
AC_CONFIG_HEADERS([config_host/config_options_calc.h])
......
......@@ -35,7 +35,7 @@ $(eval $(call gb_InstallScript_use_modules,setup_osl,\
$(if $(filter TRUE,$(ENABLE_EVOAB2) $(ENABLE_GIO) $(ENABLE_GTK) $(ENABLE_GTK3)),\
scp2/gnome \
) \
$(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_QT5)),\
$(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_QT5) $(ENABLE_KDE5)),\
scp2/kde \
) \
$(if $(filter TRUE,$(ENABLE_ONLINE_UPDATE)),\
......
......@@ -39,7 +39,7 @@ $(eval $(call gb_Module_add_targets,scp2,\
$(if $(filter TRUE,$(ENABLE_EVOAB2) $(ENABLE_GIO) $(ENABLE_GTK) $(ENABLE_GTK3)),\
InstallModule_gnome \
) \
$(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_QT5)),\
$(if $(filter TRUE,$(ENABLE_KDE4) $(ENABLE_QT5) $(ENABLE_KDE5)),\
InstallModule_kde \
) \
))
......
......@@ -81,6 +81,7 @@ $(eval $(call gb_Module_add_targets,vcl,\
Library_vclplug_kde4 \
))
endif
ifneq ($(ENABLE_KDE5),)
$(eval $(call gb_Module_add_targets,vcl,\
CustomTarget_kde5_moc \
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment