1
# This file is part of Pate, Kate' Python scripting plugin.
3
# Copyright (C) 2006 Paul Giannaros <paul@giannaros.org>
4
# Copyright (C) 2012 Shaheed Haque <srhaque@theiet.org>
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.
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.
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.
23
macro_optional_find_package(PythonLibrary)
24
macro_log_feature(PYTHON_LIBRARY "PythonLibrary" "Python Library" "")
26
macro_optional_find_package(SIP)
27
macro_log_feature(SIP_FOUND "SIP" "Support for SIP Python bindings" "")
29
macro_optional_find_package(PyQt4)
30
macro_log_feature(PYQT4_FOUND "PyQt4" "Python bindings for Qt4" "")
32
macro_optional_find_package(PyKDE4)
33
macro_log_feature(PYKDE4_FOUND "PyKDE4" "Python bindings for KDE4" "")
35
if (NOT PYTHONLIBRARY_FOUND)
36
message(WARNING "Pate plugin needs Python Library.")
38
endif (NOT PYTHONLIBRARY_FOUND)
39
if (NOT PYTHON_LIBRARY)
40
message(WARNING "Pate plugin needs Python Library. (We are halfway there broken installation??")
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})
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})
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})
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")
59
if (NOT EXISTS ${PYKDE4_SIP_DIR}/kdecore/kdecoremod.sip)
60
message(WARNING "Pate plugin needs the PyKDE4 development sip files kdecoremod.sip")
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})
66
endif (NOT PYQT4_FOUND OR ${PYQT4_VERSION_STR} VERSION_LESS 4.3.1)
68
message(WARNING "Pate plugin needs PyKDE4.")
70
endif (NOT PYKDE4_FOUND)
73
# Use the Kate header files from the current source tree.
75
set(KATE_INCLUDES ${CMAKE_CURRENT_SOURCE_DIR}/../../../kate)
78
include_directories(${CMAKE_CURRENT_SOURCE_DIR} ${SIP_INCLUDE_DIR} ${PYTHON_INCLUDE_PATH}
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}
82
${KDE4_INCLUDE_DIR} ${KDE4_INCLUDE_DIR}/solid ${KDE4_INCLUDE_DIR}/kio ${KDE4_INCLUDE_DIR}/dom ${KDE4_INCLUDE_DIR}/ksettings
84
${KATE_INCLUDES} ${KATE_INCLUDES}/interfaces ${KATE_INCLUDES}/interfaces/kate)