diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2022-06-30 13:25:01 +0200 |
---|---|---|
committer | Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> | 2022-07-05 08:18:11 +0000 |
commit | 35e626cbbc9f67091cb25bb903a537af8563f31c (patch) | |
tree | 737b0c31a8025666c1c68faa26e2ac913729c3da /cmake/FindWrapSystemPCRE2.cmake | |
parent | 3757e14cfd1527190e5f22cdf5d86dc3537bb115 (diff) |
CMake: Fix lookup of system PCRE2 version
The version option needs to be specified before the COMPONENTS
option, otherwise it is treated as another component.
This causes failures when a Conan provided FindPCRE2.cmake script is
picked up, which actually does validation of component names based
on the component information stored in the conanfile.py recipe.
Move the version value to be before COMPONENTS.
Amends 1007aac63a378c1b09f221f9b58b65bb56f9e9e8
Task-number: QTBUG-104542
Change-Id: I92c70f266a07c4aabdadcecda1ba7e107a033604
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
(cherry picked from commit bfd9e195a3b5312c3814a933bbc1bc5d9c76973e)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'cmake/FindWrapSystemPCRE2.cmake')
-rw-r--r-- | cmake/FindWrapSystemPCRE2.cmake | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmake/FindWrapSystemPCRE2.cmake b/cmake/FindWrapSystemPCRE2.cmake index 92c6e2a167..f35ee8c23b 100644 --- a/cmake/FindWrapSystemPCRE2.cmake +++ b/cmake/FindWrapSystemPCRE2.cmake @@ -4,7 +4,7 @@ if(TARGET WrapSystemPCRE2::WrapSystemPCRE2) endif() set(WrapSystemPCRE2_REQUIRED_VARS __pcre2_found) -find_package(PCRE2 COMPONENTS 16BIT ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} CONFIG QUIET) +find_package(PCRE2 ${${CMAKE_FIND_PACKAGE_NAME}_FIND_VERSION} COMPONENTS 16BIT CONFIG QUIET) set(__pcre2_target_name "PCRE2::pcre2-16") if(PCRE2_FOUND AND TARGET "${__pcre2_target_name}") |