Browse Source

FindPythonLibs: Allow find_library to search paths from system environment

Drop the `NO_SYSTEM_ENVIRONMENT_PATH` option from our `find_library`
calls.  No other find modules do this.  Also, since commit
v3.3.0-rc1~430^2 (Teach find_(library|file|path) to get prefixes from
PATH, 2015-02-18) we always search the `lib` directory of each prefix
before the `bin` directory and so should prefer the non-`.dll` name.

Issue: #17336
Brad King 8 years ago
parent
commit
192ab741ec
1 changed files with 0 additions and 4 deletions
  1. 0 4
      Modules/FindPythonLibs.cmake

+ 0 - 4
Modules/FindPythonLibs.cmake

@@ -153,15 +153,11 @@ foreach(_CURRENT_VERSION ${_Python_VERSIONS})
       ${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}
     NAMES_PER_DIR
-    # Avoid finding the .dll in the PATH.  We want the .lib.
-    NO_SYSTEM_ENVIRONMENT_PATH
     # This is where the static library is usually located
     PATH_SUFFIXES python${_CURRENT_VERSION}/config
   )