summaryrefslogtreecommitdiffstats
path: root/cmake
diff options
context:
space:
mode:
authorAlexey Edelev <alexey.edelev@qt.io>2020-11-06 15:42:09 +0100
committerAlexey Edelev <alexey.edelev@qt.io>2020-11-08 03:13:03 +0100
commita66e5a3ecad594607e68305d7afc8e7bbfcfe843 (patch)
tree5db43699e3b4e370aa217f36e6b123aa2dbf2fb4 /cmake
parentebf753d0ee017edc2b3a3f9b26347466fe4c0589 (diff)
CMake: Add PCRE2 library selection depend on debug version availability
Use select_library_configurations to select applicable libraries set for PCRE2. Fixes: QTBUG-88092 Change-Id: I11e669a0142d53a3c344c86bd1d8eb797df4ba97 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Diffstat (limited to 'cmake')
-rw-r--r--cmake/FindWrapSystemPCRE2.cmake8
1 files changed, 7 insertions, 1 deletions
diff --git a/cmake/FindWrapSystemPCRE2.cmake b/cmake/FindWrapSystemPCRE2.cmake
index 6d8b471f88..f8ed5ff7a0 100644
--- a/cmake/FindWrapSystemPCRE2.cmake
+++ b/cmake/FindWrapSystemPCRE2.cmake
@@ -24,9 +24,15 @@ if(NOT __pcre2_found)
find_path(PCRE2_INCLUDE_DIRS
NAMES pcre2.h
HINTS ${PC_PCRE2_INCLUDEDIR})
- find_library(PCRE2_LIBRARIES
+ find_library(PCRE2_LIBRARY_RELEASE
NAMES pcre2-16
HINTS ${PC_PCRE2_LIBDIR})
+ find_library(PCRE2_LIBRARY_DEBUG
+ NAMES pcre2-16d pcre2-16
+ HINTS ${PC_PCRE2_LIBDIR})
+ include(SelectLibraryConfigurations)
+ select_library_configurations(PCRE2)
+
if(PC_PCRE2_VERSION)
set(WrapSystemPCRE2_VERSION "${PC_PCRE2_VERSION}")
endif()