aboutsummaryrefslogtreecommitdiff
path: root/ports/poco/find_pcre.patch
blob: 3b73ae4f12122592344a2416f6ec9ce282d22f30 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
diff --git a/cmake/FindPCRE.cmake b/cmake/FindPCRE.cmake
index 41a99cb..b1acb32 100644
--- a/cmake/FindPCRE.cmake
+++ b/cmake/FindPCRE.cmake
@@ -14,9 +14,15 @@ ENDIF (PCRE_INCLUDE_DIRS)
 
 FIND_PATH(PCRE_INCLUDE_DIR pcre.h)
 
-SET(PCRE_NAMES pcre)
+if (WIN32)
+include(SelectLibraryConfigurations)
+find_library(PCRE_LIBRARY_RELEASE NAMES pcre)
+find_library(PCRE_LIBRARY_DEBUG NAMES pcred)
+select_library_configurations(PCRE)
+else()
+SET(PCRE_NAMES pcred pcre)
 FIND_LIBRARY(PCRE_LIBRARY NAMES ${PCRE_NAMES} )
-
+endif()
 # handle the QUIETLY and REQUIRED arguments and set PCRE_FOUND to TRUE if
 # all listed variables are TRUE
 INCLUDE(FindPackageHandleStandardArgs)