~ubuntu-branches/ubuntu/utopic/qgis/utopic

« back to all changes in this revision

Viewing changes to cmake/FindPyQt4.cmake

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2012-04-24 15:12:20 UTC
  • mfrom: (3.1.9 sid)
  • Revision ID: package-import@ubuntu.com-20120424151220-r88g00af5fpn5fc3
Tags: 1.7.4+1.7.5~20120320-1
The "Sometimes they come back" release.

* Branching from Qgis tree and adapting to current Debian Policy and
  standards. The target tree is currently set to release-1.7.
  (closes: #661491, #606304, #615683, #616182, #600308)
* Policy bumped to 3.9.3.
* Moving to debhelper compatibility level 9.
* Source format is now 3.0 with quilt support.
* Merged with 2bf42287 upstream git snapshot.
* Migrated to dh_python2 instead of python-central.
  (closes: #617048)
* Snapshot in qgis.org release-1.7: c936d031
* Added an automagic creation of a lintian override for sqlite embedding.
  This is required for uploading currently.
* Added missing ${misc:Depends} to make lintian happy.
* Copyright notes updated and debian/copyright moved to format 1.0.
* More licenses notices now reported in debian/copyright. Thanks ftpmasters.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Find PyQt4
 
2
# ~~~~~~~~~~
 
3
# Copyright (c) 2007-2008, Simon Edwards <simon@simonzone.com>
 
4
# Redistribution and use is allowed according to the terms of the BSD license.
 
5
# For details see the accompanying COPYING-CMAKE-SCRIPTS file.
 
6
#
 
7
# PyQt4 website: http://www.riverbankcomputing.co.uk/pyqt/index.php
 
8
#
 
9
# Find the installed version of PyQt4. FindPyQt4 should only be called after
 
10
# Python has been found.
 
11
#
 
12
# This file defines the following variables:
 
13
#
 
14
# PYQT4_VERSION - The version of PyQt4 found expressed as a 6 digit hex number
 
15
#     suitable for comparision as a string
 
16
#
 
17
# PYQT4_VERSION_STR - The version of PyQt4 as a human readable string.
 
18
#
 
19
# PYQT4_VERSION_TAG - The PyQt version tag using by PyQt's sip files.
 
20
#
 
21
# PYQT4_SIP_DIR - The directory holding the PyQt4 .sip files.
 
22
#
 
23
# PYQT4_SIP_FLAGS - The SIP flags used to build PyQt.
 
24
 
 
25
IF(EXISTS PYQT4_VERSION)
 
26
  # Already in cache, be silent
 
27
  SET(PYQT4_FOUND TRUE)
 
28
ELSE(EXISTS PYQT4_VERSION)
 
29
 
 
30
  FIND_FILE(_find_pyqt_py FindPyQt.py PATHS ${CMAKE_MODULE_PATH})
 
31
 
 
32
  EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} ${_find_pyqt_py} OUTPUT_VARIABLE pyqt_config)
 
33
  IF(pyqt_config)
 
34
    STRING(REGEX REPLACE "^pyqt_version:([^\n]+).*$" "\\1" PYQT4_VERSION ${pyqt_config})
 
35
    STRING(REGEX REPLACE ".*\npyqt_version_str:([^\n]+).*$" "\\1" PYQT4_VERSION_STR ${pyqt_config})
 
36
    STRING(REGEX REPLACE ".*\npyqt_version_tag:([^\n]+).*$" "\\1" PYQT4_VERSION_TAG ${pyqt_config})
 
37
    STRING(REGEX REPLACE ".*\npyqt_version_num:([^\n]+).*$" "\\1" PYQT4_VERSION_NUM ${pyqt_config})
 
38
    STRING(REGEX REPLACE ".*\npyqt_sip_dir:([^\n]+).*$" "\\1" PYQT4_SIP_DIR ${pyqt_config})
 
39
    STRING(REGEX REPLACE ".*\npyqt_sip_flags:([^\n]+).*$" "\\1" PYQT4_SIP_FLAGS ${pyqt_config})
 
40
    STRING(REGEX REPLACE ".*\npyqt_bin_dir:([^\n]+).*$" "\\1" PYQT4_BIN_DIR ${pyqt_config})
 
41
 
 
42
    SET(PYQT4_FOUND TRUE)
 
43
  ENDIF(pyqt_config)
 
44
 
 
45
  IF(PYQT4_FOUND)
 
46
    IF(NOT PYQT4_FIND_QUIETLY)
 
47
      MESSAGE(STATUS "Found PyQt4 version: ${PYQT4_VERSION_STR}")
 
48
    ENDIF(NOT PYQT4_FIND_QUIETLY)
 
49
  ELSE(PYQT4_FOUND)
 
50
    IF(PYQT4_FIND_REQUIRED)
 
51
      MESSAGE(FATAL_ERROR "Could not find Python")
 
52
    ENDIF(PYQT4_FIND_REQUIRED)
 
53
  ENDIF(PYQT4_FOUND)
 
54
 
 
55
ENDIF(EXISTS PYQT4_VERSION)
 
56
 
 
57