Skip to content

Commit

Permalink
pcre2: handle debug postfix correctly
Browse files Browse the repository at this point in the history
  • Loading branch information
valgur committed Oct 23, 2023
1 parent 87e960e commit e66a101
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions recipes/pcre2/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,9 +120,10 @@ def _patch_sources(self):
"RUNTIME DESTINATION bin BUNDLE DESTINATION bin")
# pcre2-config does not correctly include '-static' in static library names
if Version(self.version) >= "10.38" and is_msvc(self) and not self.options.shared:
postfix = "-staticd" if self.settings.build_type == "Debug" else "-static"
replace_in_file(self, cmakelists,
"CONFIGURE_FILE(libpcre2-posix.pc.in",
'string(PREPEND LIB_POSTFIX "-static")\nCONFIGURE_FILE(libpcre2-posix.pc.in')
"CONFIGURE_FILE(pcre2-config.in",
f'set(LIB_POSTFIX "{postfix}")\nCONFIGURE_FILE(pcre2-config.in')

def build(self):
self._patch_sources()
Expand Down

0 comments on commit e66a101

Please sign in to comment.