summaryrefslogtreecommitdiffstats
path: root/Modules
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2017-10-12 13:19:57 (GMT)
committerKitware Robot <kwrobot@kitware.com>2017-10-12 13:20:09 (GMT)
commit8df52df84d04d8faa50ce940358845ff67fdc3e1 (patch)
tree5cd8db07481622a69d3440da4e82541ddb1b37df /Modules
parent0d508b1ee1841aaf899c4cb32fb913b42358776c (diff)
parent192ab741ec65c96945893367bd3d04c08ca0f47a (diff)
downloadCMake-8df52df84d04d8faa50ce940358845ff67fdc3e1.zip
CMake-8df52df84d04d8faa50ce940358845ff67fdc3e1.tar.gz
CMake-8df52df84d04d8faa50ce940358845ff67fdc3e1.tar.bz2
Merge topic 'FindPythonLibs-names-per-dir'
192ab741 FindPythonLibs: Allow find_library to search paths from system environment 3976a106 FindPythonLibs: Prefer libs early in search path regardless of name Acked-by: Kitware Robot <kwrobot@kitware.com> Merge-request: !1378
Diffstat (limited to 'Modules')
-rw-r--r--Modules/FindPythonLibs.cmake7
1 files changed, 3 insertions, 4 deletions
diff --git a/Modules/FindPythonLibs.cmake b/Modules/FindPythonLibs.cmake
index 63ec9a8..341d5d9 100644
--- a/Modules/FindPythonLibs.cmake
+++ b/Modules/FindPythonLibs.cmake
@@ -122,6 +122,7 @@ foreach(_CURRENT_VERSION ${_Python_VERSIONS})
if(WIN32)
find_library(PYTHON_DEBUG_LIBRARY
NAMES python${_CURRENT_VERSION_NO_DOTS}_d python
+ NAMES_PER_DIR
HINTS ${_Python_LIBRARY_PATH_HINT}
PATHS
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs/Debug
@@ -145,20 +146,18 @@ foreach(_CURRENT_VERSION ${_Python_VERSIONS})
python${_CURRENT_VERSION}m
python${_CURRENT_VERSION}u
python${_CURRENT_VERSION}
+ NAMES_PER_DIR
HINTS
${_Python_LIBRARY_PATH_HINT}
PATHS
${PYTHON_FRAMEWORK_LIBRARIES}
[HKEY_LOCAL_MACHINE\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
[HKEY_CURRENT_USER\\SOFTWARE\\Python\\PythonCore\\${_CURRENT_VERSION}\\InstallPath]/libs
- # Avoid finding the .dll in the PATH. We want the .lib.
- NO_SYSTEM_ENVIRONMENT_PATH
)
# Look for the static library in the Python config directory
find_library(PYTHON_LIBRARY
NAMES python${_CURRENT_VERSION_NO_DOTS} python${_CURRENT_VERSION}
- # Avoid finding the .dll in the PATH. We want the .lib.
- NO_SYSTEM_ENVIRONMENT_PATH
+ NAMES_PER_DIR
# This is where the static library is usually located
PATH_SUFFIXES python${_CURRENT_VERSION}/config
)