~ubuntu-branches/ubuntu/utopic/cmake/utopic

« back to all changes in this revision

Viewing changes to debian/patches/multiarch-python-include-dirs.diff

  • Committer: Package Import Robot
  • Author(s): Modestas Vainius
  • Date: 2013-05-19 22:47:11 UTC
  • mfrom: (1.14.4) (3.1.36 sid)
  • Revision ID: package-import@ubuntu.com-20130519224711-u5epjzlruto82iak
Tags: 2.8.11-2
* Build with BZip2 support, thanks to Pino Toscano for heads up!
* Bump Standards-Version to 3.9.4: no changes needed.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: Python.h and pyconfig.h can be in different locations
 
2
Author: Dmitrijs Ledkovs <dmitrijs.ledkovs@canonical.com>
 
3
Bug: http://public.kitware.com/Bug/view.php?id=14156
 
4
Forwarded: yes
 
5
Origin: vendor
 
6
 
 
7
--- a/Modules/FindPythonLibs.cmake
 
8
+++ b/Modules/FindPythonLibs.cmake
 
9
@@ -136,6 +136,27 @@ foreach(_CURRENT_VERSION ${_Python_VERSI
 
10
       [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
 
11
       [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
 
12
     PATH_SUFFIXES
 
13
+      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}mu
 
14
+      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}m
 
15
+      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}u
 
16
+      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}
 
17
+      python${_CURRENT_VERSION}mu
 
18
+      python${_CURRENT_VERSION}m
 
19
+      python${_CURRENT_VERSION}u
 
20
+      python${_CURRENT_VERSION}
 
21
+  )
 
22
+
 
23
+  find_path(PYTHON_INCLUDE_DIR2
 
24
+    NAMES pyconfig.h
 
25
+    PATHS
 
26
+      ${PYTHON_FRAMEWORK_INCLUDES}
 
27
+      [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
 
28
+      [HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
 
29
+    PATH_SUFFIXES
 
30
+      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}mu
 
31
+      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}m
 
32
+      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}u
 
33
+      ${CMAKE_LIBRARY_ARCHITECTURE}/python${_CURRENT_VERSION}
 
34
       python${_CURRENT_VERSION}mu
 
35
       python${_CURRENT_VERSION}m
 
36
       python${_CURRENT_VERSION}u
 
37
@@ -162,13 +183,14 @@ mark_as_advanced(
 
38
   PYTHON_DEBUG_LIBRARY
 
39
   PYTHON_LIBRARY
 
40
   PYTHON_INCLUDE_DIR
 
41
+  PYTHON_INCLUDE_DIR2
 
42
 )
 
43
 
 
44
 # We use PYTHON_INCLUDE_DIR, PYTHON_LIBRARY and PYTHON_DEBUG_LIBRARY for the
 
45
 # cache entries because they are meant to specify the location of a single
 
46
 # library. We now set the variables listed by the documentation for this
 
47
 # module.
 
48
-set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}")
 
49
+set(PYTHON_INCLUDE_DIRS "${PYTHON_INCLUDE_DIR}" "${PYTHON_INCLUDE_DIR2}")
 
50
 set(PYTHON_DEBUG_LIBRARIES "${PYTHON_DEBUG_LIBRARY}")
 
51
 
 
52
 # These variables have been historically named in this module different from