Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 401549 | Differences between
and this patch

Collapse All | Expand All

(-)cmake/Modules/FindPython3Libs.cmake (-10 / +7 lines)
Lines 26-39 Link Here
26
# Is there a python3 framework? How do we search for it?
26
# Is there a python3 framework? How do we search for it?
27
# Search for the python framework on Apple.
27
# Search for the python framework on Apple.
28
# CMAKE_FIND_FRAMEWORKS(Python)
28
# CMAKE_FIND_FRAMEWORKS(Python)
29
29
set(_Python_VERSIONS
30
  ${Python_ADDITIONAL_VERSIONS} 3.2)
31
  
30
FOREACH(_CURRENT_VERSION 3.2 3.1 3.0)
32
FOREACH(_CURRENT_VERSION 3.2 3.1 3.0)
31
  IF(_CURRENT_VERSION GREATER 3.1)
33
  FOREACH(_COMPILATION_FLAGS "m" "u" "mu" "")
32
      SET(_32FLAGS "m" "u" "mu" "")
33
  ELSE()
34
      SET(_32FLAGS "")
35
  ENDIF()
36
  FOREACH(_COMPILATION_FLAGS ${_32FLAGS})
37
      STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
34
      STRING(REPLACE "." "" _CURRENT_VERSION_NO_DOTS ${_CURRENT_VERSION})
38
      IF(WIN32)
35
      IF(WIN32)
39
        IF(_CURRENT_VERSION GREATER 3.1)
36
        IF(_CURRENT_VERSION GREATER 3.1)
Lines 52-58 Link Here
52
      ENDIF(WIN32)
49
      ENDIF(WIN32)
53
50
54
      FIND_LIBRARY(PYTHON3_LIBRARY
51
      FIND_LIBRARY(PYTHON3_LIBRARY
55
          NAMES python${_CURRENT_VERSION_NO_DOTS}${_COMPILATION_FLAGS} python${_CURRENT_VERSION}${_COMPILATION_FLAGS}
52
          NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
56
        PATHS
53
        PATHS
57
          [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
54
          [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
58
          # Avoid finding the .dll in the PATH.  We want the .lib.
55
          # Avoid finding the .dll in the PATH.  We want the .lib.
Lines 60-66 Link Here
60
      )
57
      )
61
      # Look for the static library in the Python config directory
58
      # Look for the static library in the Python config directory
62
      FIND_LIBRARY(PYTHON3_LIBRARY
59
      FIND_LIBRARY(PYTHON3_LIBRARY
63
        NAMES python${_CURRENT_VERSION_NO_DOTS}${_COMPILATION_FLAGS} python${_CURRENT_VERSION}${_COMPILATION_FLAGS}
60
        NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
64
        # Avoid finding the .dll in the PATH.  We want the .lib.
61
        # Avoid finding the .dll in the PATH.  We want the .lib.
65
        NO_SYSTEM_ENVIRONMENT_PATH
62
        NO_SYSTEM_ENVIRONMENT_PATH
66
        # This is where the static library is usually located
63
        # This is where the static library is usually located
Lines 99-105 Link Here
99
          ${PYTHON_FRAMEWORK_INCLUDES}
96
          ${PYTHON_FRAMEWORK_INCLUDES}
100
          [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
97
          [HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/include
101
        PATH_SUFFIXES
98
        PATH_SUFFIXES
102
        python${_CURRENT_VERSION}${_COMPILATION_FLAGS}
99
        python${_CURRENT_VERSION}
103
      )
100
      )
104
101
105
      # For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.
102
      # For backward compatibility, set PYTHON_INCLUDE_PATH, but make it internal.

Return to bug 401549