~ubuntu-branches/ubuntu/quantal/cmake/quantal

« back to all changes in this revision

Viewing changes to debian/patches/backport_findpkgconfig_set_found_variable.diff

  • Committer: Package Import Robot
  • Author(s): Felix Geyer
  • Date: 2012-04-30 12:14:32 UTC
  • mfrom: (3.1.30 sid)
  • Revision ID: package-import@ubuntu.com-20120430121432-rqh2fjl3zcblehh5
Tags: 2.8.8-2ubuntu1
* Merge from Debian unstable, remaining changes:
  - Add xfail_compiler_flag.diff: Mark compiler flag tests as expected
    failures.
  - Add ubuntu_qt_import_dir_variable.diff: define QT_IMPORTS_DIR even
    when that dir does not exist.
* Remove increase_ctest_test_timeout.diff, merged upstream.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
From: Rolf Eike Beer <eike@sf-mail.de>
 
2
Date: Fri, 13 Apr 2012 08:50:49 +0200
 
3
Subject: FindPkgConfig.cmake: fix documented output variable not set
 
4
Origin: backport, commit:3ea850a5023060b84dcc0e6f0098c32c28b15807
 
5
Bug: http://public.kitware.com/Bug/view.php?id=13125
 
6
Bug-Debian: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=669627
 
7
Applied-Upstream: 2.8.9
 
8
 
 
9
The real fix is from Yury G. Kudryashov while I added the surrounding cleanups.
 
10
An additional hint to really get this fixed came from Rex Dieter.
 
11
 
 
12
--- a/Modules/FindPkgConfig.cmake
 
13
+++ b/Modules/FindPkgConfig.cmake
 
14
@@ -13,11 +13,10 @@
 
15
 # When the 'QUIET' argument is set, no status messages will be printed.
 
16
 #
 
17
 # It sets the following variables:
 
18
-#   PKG_CONFIG_FOUND          ... true if pkg-config works on the system
 
19
+#   PKG_CONFIG_FOUND          ... if pkg-config executable was found
 
20
 #   PKG_CONFIG_EXECUTABLE     ... pathname of the pkg-config program
 
21
 #   PKG_CONFIG_VERSION_STRING ... the version of the pkg-config program found
 
22
 #                                 (since CMake 2.8.8)
 
23
-#   PKG_CONFIG_FOUND          ... if pkg-config executable was found
 
24
 #
 
25
 # For the following variables two sets of values exist; first one is the
 
26
 # common one and has the given PREFIX. The second set contains flags
 
27
@@ -104,6 +103,11 @@ find_package_handle_standard_args(PkgCon
 
28
                                   REQUIRED_VARS PKG_CONFIG_EXECUTABLE
 
29
                                   VERSION_VAR PKG_CONFIG_VERSION_STRING)
 
30
 
 
31
+# This is needed because the module name is "PkgConfig" but the name of
 
32
+# this variable has always been PKG_CONFIG_FOUND so this isn't automatically
 
33
+# handled by FPHSA.
 
34
+set(PKG_CONFIG_FOUND "${PKGCONFIG_FOUND}")
 
35
+
 
36
 # Unsets the given variables
 
37
 macro(_pkgconfig_unset var)
 
38
   set(${var} "" CACHE INTERNAL "")
 
39
--- a/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
 
40
+++ b/Tests/CMakeOnly/AllFindModules/CMakeLists.txt
 
41
@@ -71,7 +71,7 @@ endmacro(check_version_string)
 
42
 # reported.
 
43
 
 
44
 foreach(VTEST ALSA ARMADILLO BZIP2 CUPS CURL EXPAT FREETYPE GETTEXT GIT HSPELL
 
45
-        JASPER LIBXML2 LIBXSLT PERL PostgreSQL TIFF ZLIB)
 
46
+        JASPER LIBXML2 LIBXSLT PERL PKG_CONFIG PostgreSQL TIFF ZLIB)
 
47
     check_version_string(${VTEST} ${VTEST}_VERSION_STRING)
 
48
 endforeach(VTEST)
 
49
 
 
50
@@ -82,4 +82,3 @@ endforeach(VTEST)
 
51
 
 
52
 check_version_string(PYTHONINTERP PYTHON_VERSION_STRING)
 
53
 check_version_string(SUBVERSION Subversion_VERSION_SVN)
 
54
-check_version_string(PKGCONFIG PKG_CONFIG_VERSION_STRING)