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 Nov 18, 2023
1 parent 48cfbd4 commit 0718c17
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions recipes/pcre2/all/conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -119,10 +119,13 @@ def _patch_sources(self):
"RUNTIME DESTINATION bin",
"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:
if Version(self.version) >= "10.38" and is_msvc(self):
postfix = "-static" if not self.options.shared else ""
if self.settings.build_type == "Debug":
postfix += "d"
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 0718c17

Please sign in to comment.