summaryrefslogtreecommitdiff
blob: dfac6b5564352a6cbb00c99536b78d83466cc5d5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
--- a/configure.ac
+++ b/configure.ac
@@ -1449,6 +1449,28 @@
 
 AM_CONDITIONAL(KDE4_APPLET, test "x$enable_kde4_applet" = xyes)
 
+dnl ****************************
+dnl *** test for KDE5 applet ***
+dnl ****************************
+AC_ARG_ENABLE(kde5-applet,
+  AC_HELP_STRING([--disable-kde5-applet],
+    [do not build uim KDE Plasma 5 widget]),
+  [],
+  [enable_kde5_applet=yes])
+
+if test "x$enable_kde5_applet" != xno; then
+  if test "x$with_qt5" != xyes; then
+    enable_kde5_applet=no
+  fi
+fi
+
+if test "x$enable_kde5_applet" = xyes && test "x$CMAKE" = xno; then
+  AC_MSG_WARN([no CMake found])
+  enable_kde5_applet=no
+fi
+
+AM_CONDITIONAL(KDE5_APPLET, test "x$enable_kde5_applet" = xyes)
+
 AC_ARG_ENABLE(pref,
   AC_HELP_STRING([--disable-pref],
     [do not build graphical utility to edit user settings]),
@@ -1883,7 +1905,6 @@
   cmake_option="-DCMAKE_BUILD_TYPE=${cmake_build_type}"
   cmake_option="${cmake_option} -DCMAKE_INSTALL_PREFIX=${prefix}"
   cmake_option="${cmake_option} -DCMAKE_SKIP_RPATH=true"
-  cmake_option="${cmake_option} -DKDE4_USE_ALWAYS_FULL_RPATH=false"
 fi
 
 if test "x$with_qt4" = xyes; then
@@ -1948,12 +1969,15 @@
     qt5_immodule_option="DEFINES+=QT5_IMMODULE"
   fi
   set -e
-  # FIXME: move CMAKE_CXX_FLAGS into cmake_option
-  ${CMAKE} \
-    -B ${ac_abs_top_builddir}/qt5/applet.cmake \
-    -S ${ac_abs_top_srcdir}/qt5/applet \
-    -DCMAKE_CXX_FLAGS="${CXXFLAGS} ${X_CFLAGS}" \
-    ${cmake_option}
+  # Generate a Makefile for KDE5 applet by cmake
+  if test "x$enable_kde5_applet" = xyes; then
+    # FIXME: move CMAKE_CXX_FLAGS into cmake_option
+    ${CMAKE} \
+      -B ${ac_abs_top_builddir}/qt5/applet.cmake \
+      -S ${ac_abs_top_srcdir}/qt5/applet \
+      -DCMAKE_CXX_FLAGS="${CXXFLAGS} ${X_CFLAGS}" \
+      ${cmake_option}
+  fi
   ${QMAKE5} -o ${ac_abs_top_builddir}/qt5/candwin/Makefile.qmake \
     ${ac_abs_top_builddir}/qt5/candwin/uim-candwin-qt5.pro
   ${QMAKE5} -o ${ac_abs_top_builddir}/qt5/chardict/Makefile.qmake \
@@ -2007,6 +2031,7 @@
    Qt5 immodule    : ${with_qt5_immodule}
    KDE3 Applet     : ${enable_kde_applet}
    KDE4 Applet     : ${enable_kde4_applet}
+   KDE5 Applet     : ${enable_kde5_applet}
    FEP             : ${enable_fep}
    Emacs           : ${enable_emacs}
    XIM             : ${use_xim}
--- a/qt5/applet/Makefile.am
+++ b/qt5/applet/Makefile.am
@@ -6,6 +6,8 @@
 	plasmoid
 
 if QT5
+if KDE5_APPLET
 all clean install uninstall:
 	$(MAKE) $(AM_MAKEFLAGS) -C ../applet.cmake $@
 endif
+endif