blob: cb328555a9506ccce80787e1cf9d7cee8a5f40ca (
plain) (
blame)
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
|
# See http://python.6.n6.nabble.com/latest-pykde4-4-9-2-build-fails-against-new-sip-4-14-PyQt-4-9-5-td4990652.html
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 80e0fde..c5bb90d 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -26,15 +26,16 @@ FIND_PACKAGE(PythonLibrary REQUIRED)
INCLUDE(PythonMacros)
FIND_PACKAGE(SIP REQUIRED)
-IF(SIP_VERSION STRLESS "040d01") # These version numbers also appear in ../CMakeLists.txt
- MESSAGE(FATAL_ERROR "The version of SIP found is too old. 4.13.1 or later is needed.")
-ENDIF(SIP_VERSION STRLESS "040d01")
+IF(SIP_VERSION STRLESS "040e00") # These version numbers also appear in ../CMakeLists.txt
+ MESSAGE(FATAL_ERROR "The version of SIP found is too old. 4.14 or later is needed.")
+ENDIF(SIP_VERSION STRLESS "040e00")
INCLUDE(SIPMacros)
FIND_PACKAGE(PyQt4 REQUIRED)
-IF(PYQT4_VERSION STRLESS "040900") # These version numbers also appear in ../CMakeLists.txt
+IF(PYQT4_VERSION STRLESS "040905") # These version numbers also appear in ../CMakeLists.txt
MESSAGE(FATAL_ERROR "The version of PyQt found is too old. 4.9 or later is required.")
-ENDIF(PYQT4_VERSION STRLESS "040900")
+ENDIF(PYQT4_VERSION STRLESS "040905")
+
SET(SOPRANO_MIN_VERSION "2.0")
@@ -93,9 +94,19 @@ SET(SIP_DISABLE_FEATURES VendorID PyQt_NoPrintRangeBug)
# Use an extra option when compiling on Python 3.
IF (PYTHON_3)
- SET(SIP_EXTRA_OPTIONS -g -x Py_v3)
+ IF(PYQT4_VERSION STRGREATER "040904")
+ # Disable for newer PyQt
+ SET(SIP_EXTRA_OPTIONS -g -x PyKDE_QVector -x Py_v3)
+ ELSE (PYQT4_VERSION STRGREATER "040904")
+ SET(SIP_EXTRA_OPTIONS -g -x Py_v3)
+ ENDIF(PYQT4_VERSION STRGREATER "040904")
ELSE (PYTHON_3)
- SET(SIP_EXTRA_OPTIONS -g)
+ IF(PYQT4_VERSION STRGREATER "040904")
+ # Disable for newer PyQt
+ SET(SIP_EXTRA_OPTIONS -g -x PyKDE_QVector)
+ ELSE (PYQT4_VERSION STRGREATER "040904")
+ SET(SIP_EXTRA_OPTIONS -g)
+ ENDIF(PYQT4_VERSION STRGREATER "040904")
ENDIF (PYTHON_3)
ADD_DEFINITIONS(-D_REENTRANT -DQT_CORE_LIB -DQT_GUI_LIB -DUSING_SOPRANO_NRLMODEL_UNSTABLE_API)
diff --git a/sip/kdecore/typedefs.sip b/sip/kdecore/typedefs.sip
index 5a0a080..af53f85 100644
--- a/sip/kdecore/typedefs.sip
+++ b/sip/kdecore/typedefs.sip
@@ -951,6 +951,9 @@ template <TYPE1>
%End
};
+%Feature PyKDE_QVector
+
+%If(PyKDE_QVector)
%MappedType QVector<int>
{
%TypeHeaderCode
@@ -1025,3 +1028,4 @@ template <TYPE1>
return sipGetState(sipTransferObj);
%End
};
+%End
\ No newline at end of file
|