Skip to content

FindPythonLibs: Prefer libs early in search path regardless of name

Brad King requested to merge brad.king/cmake:FindPythonLibs-names-per-dir into master

Add NAMES_PER_DIR to all find_library invocations so that we consider all possible names in each search directory before moving on to the next directory. This helps find the package that appears earliest in the search path regardless of how it names its libraries.

While at it, drop the NO_SYSTEM_ENVIRONMENT_PATH option from our find_library calls. No other find modules do this.

Fixes: #17336 (closed)

Merge request reports