diff options
author | Brad King <brad.king@kitware.com> | 2022-06-28 13:22:48 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2022-06-28 13:22:55 (GMT) |
commit | 3fcdc98b7dfd028e4e90db26b289a0ee7ccb1202 (patch) | |
tree | 236b576636f06f4aa281c2ac3d4c2cd9cf3fa7e3 /Modules/FindPython | |
parent | 6f55f5847d7579d37deb7261b2fa0f256ea645b5 (diff) | |
parent | ece3bedbf2cdc4857f19e2fceafa98a3f8002b4a (diff) | |
download | CMake-3fcdc98b7dfd028e4e90db26b289a0ee7ccb1202.zip CMake-3fcdc98b7dfd028e4e90db26b289a0ee7ccb1202.tar.gz CMake-3fcdc98b7dfd028e4e90db26b289a0ee7ccb1202.tar.bz2 |
Merge topic 'FindPython-multiple-queries'
ece3bedbf2 FindPython: fix error on multiple queries with different COMPONENTS
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !7410
Diffstat (limited to 'Modules/FindPython')
-rw-r--r-- | Modules/FindPython/Support.cmake | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Modules/FindPython/Support.cmake b/Modules/FindPython/Support.cmake index a8accae..53519ba 100644 --- a/Modules/FindPython/Support.cmake +++ b/Modules/FindPython/Support.cmake @@ -2895,7 +2895,8 @@ if (("Development.Module" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS endif() unset (_${_PYTHON_PREFIX}_INCLUDE_HINTS) - if (_${_PYTHON_PREFIX}_LIBRARY_RELEASE) + if ("LIBRARY" IN_LIST _${_PYTHON_PREFIX}_FIND_DEVELOPMENT_ARTIFACTS + AND _${_PYTHON_PREFIX}_LIBRARY_RELEASE) # Use the library's install prefix as a hint if (_${_PYTHON_PREFIX}_LIBRARY_RELEASE MATCHES "^(.+/Frameworks/Python.framework/Versions/[0-9.]+)") list (APPEND _${_PYTHON_PREFIX}_INCLUDE_HINTS "${CMAKE_MATCH_1}") @@ -2979,7 +2980,8 @@ if (("Development.Module" IN_LIST ${_PYTHON_PREFIX}_FIND_COMPONENTS if (_${_PYTHON_PREFIX}_INCLUDE_DIR) # retrieve version from header file _python_get_version (INCLUDE PREFIX _${_PYTHON_PREFIX}_INC_) - if (_${_PYTHON_PREFIX}_LIBRARY_RELEASE) + if ("LIBRARY" IN_LIST _${_PYTHON_PREFIX}_FIND_DEVELOPMENT_ARTIFACTS + AND _${_PYTHON_PREFIX}_LIBRARY_RELEASE) if ("${_${_PYTHON_PREFIX}_INC_VERSION_MAJOR}.${_${_PYTHON_PREFIX}_INC_VERSION_MINOR}" VERSION_EQUAL _${_PYTHON_PREFIX}_VERSION) # update versioning |