httpd icon indicating copy to clipboard operation
httpd copied to clipboard

[cmake] Fix check for debug static build of pcre2

Open tobil4sk opened this issue 2 years ago • 1 comments

The correct name is pcre2-8-staticd.lib, not pcre2-8d-static.lib.

If the static debug build is the only one available, the value of default_pcre_libraries would previously default to pcre.lib, and so there was a linking error if this library did not exist.

Now the library will be correctly detected, which avoids errors if the static debug build is the only one available.

tobil4sk avatar Feb 16 '23 19:02 tobil4sk

Any chance this could be merged? This can be verified in the pcre2 cmake file:

The library name is pcre2-8-static: https://github.com/PCRE2Project/pcre2/blob/44d95814f6414d40de6300817ae9d2bec0babc39/CMakeLists.txt#L703

And the d suffix comes after the library name, from CMAKE_DEBUG_POSTFIX: https://github.com/PCRE2Project/pcre2/blob/44d95814f6414d40de6300817ae9d2bec0babc39/CMakeLists.txt#L584

tobil4sk avatar Sep 06 '24 13:09 tobil4sk