~ubuntu-branches/ubuntu/vivid/kate/vivid-updates

« back to all changes in this revision

Viewing changes to addons/pate/CMakeLists.txt

  • Committer: Package Import Robot
  • Author(s): Jonathan Riddell
  • Date: 2014-12-04 16:49:41 UTC
  • mfrom: (1.6.6)
  • Revision ID: package-import@ubuntu.com-20141204164941-l3qbvsly83hhlw2v
Tags: 4:14.11.97-0ubuntu1
* New upstream release
* Update build-deps and use pkg-kde v3 for Qt 5 build
* kate-data now kate5-data for co-installability

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# This file is part of Pate, Kate' Python scripting plugin.
 
2
#
 
3
# Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
 
4
# Copyright (C) 2012 Shaheed Haque <srhaque@theiet.org>
 
5
#
 
6
# This library is free software; you can redistribute it and/or
 
7
# modify it under the terms of the GNU Library General Public
 
8
# License as published by the Free Software Foundation; either
 
9
# version 2 of the License, or (at your option) version 3.
 
10
#
 
11
# This library is distributed in the hope that it will be useful,
 
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
 
14
# Library General Public License for more details.
 
15
#
 
16
# You should have received a copy of the GNU Library General Public License
 
17
# along with this library; see the file COPYING.LIB.  If not, write to
 
18
# the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 
19
# Boston, MA 02110-1301, USA.
 
20
 
 
21
project(pate)
 
22
 
 
23
macro_optional_find_package(PythonLibrary)
 
24
macro_log_feature(PYTHON_LIBRARY "PythonLibrary" "Python Library" "")
 
25
 
 
26
macro_optional_find_package(SIP)
 
27
macro_log_feature(SIP_FOUND "SIP" "Support for SIP Python bindings" "")
 
28
 
 
29
macro_optional_find_package(PyQt4)
 
30
macro_log_feature(PYQT4_FOUND "PyQt4" "Python bindings for Qt4" "")
 
31
 
 
32
macro_optional_find_package(PyKDE4)
 
33
macro_log_feature(PYKDE4_FOUND "PyKDE4" "Python bindings for KDE4" "")
 
34
 
 
35
if (NOT PYTHONLIBRARY_FOUND)
 
36
    message(WARNING "Pate plugin needs Python Library.")
 
37
    return()
 
38
endif (NOT PYTHONLIBRARY_FOUND)
 
39
if (NOT PYTHON_LIBRARY)
 
40
    message(WARNING "Pate plugin needs Python Library. (We are halfway there broken installation??")
 
41
    return()
 
42
endif (NOT PYTHON_LIBRARY)
 
43
if (${PYTHON_SHORT_VERSION} VERSION_LESS 3.4)
 
44
    message(WARNING "Pate plugin needs Python version 3.4 or later. " ${PYTHON_SHORT_VERSION})
 
45
    return()
 
46
endif (${PYTHON_SHORT_VERSION} VERSION_LESS 3.4)
 
47
if (NOT SIP_FOUND OR ${SIP_VERSION_STR} VERSION_LESS 4.7.1)
 
48
    message(WARNING "Pate plugin needs SIP 4.7.1 or later. " ${SIP_VERSION_STR})
 
49
    return()
 
50
endif (NOT SIP_FOUND OR ${SIP_VERSION_STR} VERSION_LESS 4.7.1)
 
51
if (NOT SIP_EXECUTABLE OR NOT EXISTS ${SIP_EXECUTABLE})
 
52
    message(WARNING "Pate plugin needs SIP executable " ${SIP_EXECUTABLE})
 
53
    return()
 
54
endif (NOT SIP_EXECUTABLE OR NOT EXISTS ${SIP_EXECUTABLE})
 
55
if (NOT EXISTS ${PYQT4_SIP_DIR}/QtCore/QtCoremod.sip)
 
56
    message(WARNING "Pate plugin needs the PyQt4 development sip file QtCoremod.sip")
 
57
    return()
 
58
endif()
 
59
if (NOT EXISTS ${PYKDE4_SIP_DIR}/kdecore/kdecoremod.sip)
 
60
    message(WARNING "Pate plugin needs the PyKDE4 development sip files kdecoremod.sip")
 
61
    return()
 
62
endif()
 
63
if (NOT PYQT4_FOUND OR ${PYQT4_VERSION_STR} VERSION_LESS 4.3.1)
 
64
    message(WARNING "Pate plugin needs PyQT 4.3.1 or later. " ${PYQT4_VERSION_STR})
 
65
    return()
 
66
endif (NOT PYQT4_FOUND OR ${PYQT4_VERSION_STR} VERSION_LESS 4.3.1)
 
67
if (NOT PYKDE4_FOUND)
 
68
    message(WARNING "Pate plugin needs PyKDE4.")
 
69
    return()
 
70
endif (NOT PYKDE4_FOUND)
 
71
 
 
72
#
 
73
# Use the Kate header files from the current source tree.
 
74
#
 
75
set(KATE_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/../../../kate)
 
76
 
 
77
include(KDE4Defaults)
 
78
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${SIP_INCLUDE_DIR} ${PYTHON_INCLUDE_PATH}
 
79
    # Qt
 
80
    ${QT_INCLUDE_DIR} ${QT_QT_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTCORE_INCLUDE_DIR} ${QT_QTGUI_INCLUDE_DIR} ${QT_QTNETWORK_INCLUDE_DIR} ${QT_QTOPENGL_INCLUDE_DIR} ${QT_QTSQL_INCLUDE_DIR} ${QT_QTXML_INCLUDE_DIR} ${QT_QTSVG_INCLUDE_DIR} ${QT_WEBKIT_INCLUDE_DIR}
 
81
    # KDE
 
82
    ${KDE4_INCLUDE_DIR} ${KDE4_INCLUDE_DIR}/solid ${KDE4_INCLUDE_DIR}/kio ${KDE4_INCLUDE_DIR}/dom ${KDE4_INCLUDE_DIR}/ksettings
 
83
    # Kate
 
84
    ${KATE_INCLUDES} ${KATE_INCLUDES}/interfaces ${KATE_INCLUDES}/interfaces/kate)
 
85
 
 
86
add_subdirectory(sip)
 
87
add_subdirectory(src)