diff --git a/cmake/pcre2-config.cmake.in b/cmake/pcre2-config.cmake.in index 12f3a35ad..84eebad75 100644 --- a/cmake/pcre2-config.cmake.in +++ b/cmake/pcre2-config.cmake.in @@ -49,6 +49,8 @@ else () set(PCRE2_SUFFIX ${CMAKE_SHARED_LIBRARY_SUFFIX}) if (MINGW AND PCRE2_NON_STANDARD_LIB_SUFFIX) set(PCRE2_SUFFIX "-0.dll") + elseif(MSVC) + set(PCRE2_SUFFIX ${CMAKE_STATIC_LIBRARY_SUFFIX}) endif () endif () find_library(PCRE2_8BIT_LIBRARY NAMES ${PCRE2_PREFIX}${PCRE2_8BIT_NAME}${PCRE2_SUFFIX} ${PCRE2_PREFIX}${PCRE2_8BIT_NAME}d${PCRE2_SUFFIX} DOC "8 bit PCRE2 library")