mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-23 02:57:09 +01:00
[libgit2] Add features pcre,pcre2 to choose regex backend (#10333)
* [libgit2] Add features to build against vcpkg pcre,pcre2 * version * libgit2 will automatically link to 'system' zlib, which is inconsistent depending on if vcpkg zlib was installed or not. This rectifies this by always targeting vcpkg zlib
This commit is contained in:
parent
2c68b1229b
commit
fd12965463
@ -1,6 +1,14 @@
|
||||
Source: libgit2
|
||||
Version: 0.99.0
|
||||
Version: 0.99.0-1
|
||||
Homepage: https://github.com/libgit2/libgit2
|
||||
Build-Depends: openssl (!windows&&!uwp)
|
||||
Build-Depends: zlib, openssl (!windows&&!uwp)
|
||||
Description: Git linkable library
|
||||
Supports: !uwp
|
||||
|
||||
Feature: pcre
|
||||
Description: Build against external libpcre
|
||||
Build-Depends: pcre
|
||||
|
||||
Feature: pcre2
|
||||
Description: Build against external libpcre2
|
||||
Build-Depends: pcre2
|
||||
|
@ -11,11 +11,20 @@ vcpkg_from_github(
|
||||
|
||||
string(COMPARE EQUAL "${VCPKG_CRT_LINKAGE}" "static" STATIC_CRT)
|
||||
|
||||
if ("pcre" IN_LIST FEATURES)
|
||||
set(REGEX_BACKEND pcre)
|
||||
elseif ("pcre2" IN_LIST FEATURES)
|
||||
set(REGEX_BACKEND pcre2)
|
||||
else()
|
||||
set(REGEX_BACKEND builtin)
|
||||
endif()
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DBUILD_CLAR=OFF
|
||||
-DREGEX_BACKEND=${REGEX_BACKEND}
|
||||
-DSTATIC_CRT=${STATIC_CRT}
|
||||
)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user