~ubuntu-branches/ubuntu/raring/pykde4/raring

« back to all changes in this revision

Viewing changes to CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Philip Muškovac, Scott Kitterman
  • Date: 2012-12-08 14:17:32 UTC
  • mfrom: (28.1.1 raring-proposed)
  • Revision ID: package-import@ubuntu.com-20121208141732-u3ybrqh5063jdgel
Tags: 4:4.9.90-0ubuntu2
[ Philip Muškovac ]
* Bump build-dep on python-sip-dev to >= 4.14 
* Bump build-dep on python-qt4 and python-qt4-dev to >= 4.9

[ Scott Kitterman ]
* Add debian/patches/pythonpluginfactory_python3.diff to support KCMs
  written in Python 3
* Update debian/python3-pykde4.install
* Update debian/rules to proved version specific ABI tags for Python 3
  variants of kpythonplugingactory
* Update debian/not-installed

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
if(SIP_VERSION STRLESS "040e00")    # These version numbers also appear in ../CMakeLists.txt
31
31
    message(FATAL_ERROR "The version of SIP found is too old. 4.14 or later is needed.")
32
 
endif(SIP_VERSION STRLESS "040e00")
 
32
endif()
33
33
 
34
34
find_package(PyQt4)
35
35
macro_log_feature(PYQT4_FOUND "PyQt4" "The PyQt bindings" "http://riverbankcomputing.com" TRUE
37
37
 
38
38
if(PYQT4_VERSION STRLESS "040905")  # These version numbers also appear in ../CMakeLists.txt
39
39
    message(FATAL_ERROR "The version of PyQt found is too old. 4.9 or later is required.")
40
 
endif(PYQT4_VERSION STRLESS "040905")
 
40
endif()
41
41
 
42
42
set(SOPRANO_MIN_VERSION "2.0")
43
43
macro_optional_find_package(Soprano)
47
47
macro_log_feature(Nepomuk_FOUND "Nepomuk" "Nepomuk Libraries" "kdesupport" FALSE "" "Required for Nepomuk Python bindings.")
48
48
 
49
49
macro_optional_find_package(KdepimLibs)
50
 
macro_log_feature(KDEPIMLIBS_FOUND "Kdepimlibs" "KDE pim Libraries" "kdepimlibs" FALSE "" "Required for Akonadi Python bindings.")
 
50
macro_log_feature(KdepimLibs_FOUND "Kdepimlibs" "KDE pim Libraries" "kdepimlibs" FALSE "" "Required for Akonadi Python bindings.")
51
51
 
52
52
macro_optional_find_package(PolkitQt)
53
53
macro_log_feature(POLKITQT_FOUND "Polkit-Qt" "Qt Wrapper around PolicyKit" "kdesupport" FALSE "" "Required to build PolicyKit-Qt support")
84
84
set(SIP_CONCAT_PARTS 8)
85
85
if (WIN32)
86
86
    set(SIP_TAGS ALL WS_WIN ${PYQT4_VERSION_TAG})
87
 
else (WIN32)
 
87
else ()
88
88
    set(SIP_TAGS ALL WS_X11 ${PYQT4_VERSION_TAG})
89
 
endif (WIN32)
 
89
endif ()
90
90
set(SIP_DISABLE_FEATURES VendorID PyQt_NoPrintRangeBug ${SIP_ARM_HACK})
91
91
 
92
92
# Use an extra option when compiling on Python 3.
93
93
if (PYTHON_VERSION_MAJOR GREATER 2)
94
94
    if(PYQT4_VERSION STRGREATER "040904")
95
 
        # Disable for newer PyQt
96
 
        set(SIP_EXTRA_OPTIONS -g -x PyKDE_QVector -x Py_v3)
97
 
    else (PYQT4_VERSION STRGREATER "040904")
98
 
        set(SIP_EXTRA_OPTIONS -g -x Py_v3)
99
 
    endif(PYQT4_VERSION STRGREATER "040904")
 
95
            # Disable for newer PyQt
 
96
            set(SIP_EXTRA_OPTIONS -g -x PyKDE_QVector)
 
97
    else ()
 
98
            set(SIP_EXTRA_OPTIONS -g)
 
99
    endif()
100
100
else (PYTHON_VERSION_MAJOR GREATER 2)
101
101
    if(PYQT4_VERSION STRGREATER "040904")
102
102
        # Disable for newer PyQt
103
 
        set(SIP_EXTRA_OPTIONS -g -x PyKDE_QVector)
104
 
    else (PYQT4_VERSION STRGREATER "040904")
105
 
        set(SIP_EXTRA_OPTIONS -g)
106
 
    endif(PYQT4_VERSION STRGREATER "040904")
107
 
endif (PYTHON_VERSION_MAJOR GREATER 2)
 
103
        set(SIP_EXTRA_OPTIONS -g -x PyKDE_QVector -x Py_v3)
 
104
    else ()
 
105
            set(SIP_EXTRA_OPTIONS -g -x Py_v3)
 
106
    endif()
 
107
endif ()
108
108
 
109
109
add_definitions(-D_REENTRANT -DQT_CORE_LIB -DQT_GUI_LIB -DUSING_SOPRANO_NRLMODEL_UNSTABLE_API)
110
110
 
171
171
    set(SIP_EXTRA_FILES_DEPEND ${soprano_files_sip})
172
172
    add_sip_python_module(PyKDE4.soprano sip/soprano/sopranomod.sip ${SOPRANO_LIBRARIES} ${SOPRANO_CLIENT_LIBRARIES} ${SOPRANO_SERVER_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTNETWORK_LIBRARY})
173
173
    set(PYKDE_MODULES "${PYKDE_MODULES} soprano")
174
 
endif(Soprano_FOUND)
 
174
endif()
175
175
 
176
176
if(Nepomuk_FOUND)
177
177
    include_directories(${NEPOMUK_INCLUDE_DIR})
179
179
    set(SIP_EXTRA_FILES_DEPEND ${nepomuk_files_sip})
180
180
    add_sip_python_module(PyKDE4.nepomuk sip/nepomuk/nepomukmod.sip ${NEPOMUK_LIBRARIES} ${NEPOMUK_QUERY_LIBRARIES} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${SOPRANO_LIBRARIES} ${KDE4_KIO_LIBS})
181
181
    set(PYKDE_MODULES "${PYKDE_MODULES} nepomuk")
182
 
endif(Nepomuk_FOUND)
 
182
endif()
183
183
 
184
 
if(KDEPIMLIBS_FOUND)
 
184
if(KdepimLibs_FOUND)
185
185
    include_directories(${KDEPIMLIBS_INCLUDE_DIR})
186
186
    file(GLOB akonadi_files_sip sip/akonadi/*.sip)
187
187
    set(SIP_EXTRA_FILES_DEPEND ${akonadi_files_sip})
188
188
    add_sip_python_module(PyKDE4.akonadi sip/akonadi/akonadimod.sip ${KDE4_AKONADI_LIBS} ${KDE4_AKONADI_KMIME_LIBS} ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${KDE4_KDECORE_LIBS} ${KDE4_KDEUI_LIBS})
189
189
    set(PYKDE_MODULES "${PYKDE_MODULES} akonadi")
190
 
endif(KDEPIMLIBS_FOUND)
 
190
endif()
191
191
 
192
192
if(POLKITQT_FOUND)
193
193
    include_directories(${POLKITQT_INCLUDE_DIR})
200
200
    set(SIP_EXTRA_FILES_DEPEND ${pollkitqt_files_sip})
201
201
    add_sip_python_module(PyKDE4.polkitqt sip/polkitqt/polkitqtmod.sip ${QT_QTCORE_LIBRARY} ${QT_QTGUI_LIBRARY} ${POLKITQT_LIBRARIES})
202
202
    set(PYKDE_MODULES "${PYKDE_MODULES} polkitqt")
203
 
endif(POLKITQT_FOUND)
 
203
endif()
204
204
 
205
205
python_install(__init__.py ${PYTHON_SITE_PACKAGES_INSTALL_DIR}/PyKDE4)
206
206
 
261
261
add_subdirectory(tools)
262
262
#add_subdirectory(docs)
263
263
add_subdirectory(examples)
264
 
if (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION)
 
264
# Due to version specific ABI tagging in Python 3 so files, we can build for
 
265
# all Python 3 versions without a problem.
 
266
if ((PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION) OR PYTHON_VERSION_MAJOR GREATER 2)
265
267
    add_subdirectory(kpythonpluginfactory)
266
 
endif (PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION)
 
268
endif ((PYTHON_VERSION_MAJOR LESS 3 AND DEFAULT_PYTHON_VERSION) OR PYTHON_VERSION_MAJOR GREATER 2)
267
269
 
268
270
macro_display_feature_log()