Skip to content

Commit

Permalink
[folly] Fix incorrect option of zlib from PR 27728 (#27864)
Browse files Browse the repository at this point in the history
* [folly] Fix incorrect option of zlib from  PR 27728

* x-add-version

* apply suggestion

* x-add-version
  • Loading branch information
LilyWangLL authored Nov 17, 2022
1 parent 3776224 commit 9d145e8
Show file tree
Hide file tree
Showing 4 changed files with 18 additions and 19 deletions.
28 changes: 11 additions & 17 deletions ports/folly/portfile.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -36,23 +36,17 @@ else()
set(MSVC_USE_STATIC_RUNTIME OFF)
endif()

set(FEATURE_OPTIONS)

macro(feature FEATURENAME PACKAGENAME)
if("${FEATURENAME}" IN_LIST FEATURES)
list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${PACKAGENAME}=OFF)
else()
list(APPEND FEATURE_OPTIONS -DCMAKE_DISABLE_FIND_PACKAGE_${PACKAGENAME}=ON)
endif()
endmacro()

feature(zlib ZLIB)
feature(bzip2 BZip2)
feature(lzma LibLZMA)
feature(lz4 LZ4)
feature(zstd Zstd)
feature(snappy Snappy)
feature(libsodium unofficial-sodium)
vcpkg_check_features(OUT_FEATURE_OPTIONS FEATURE_OPTIONS
FEATURES
"zlib" CMAKE_REQUIRE_FIND_PACKAGE_ZLIB
INVERTED_FEATURES
"bzip2" CMAKE_DISABLE_FIND_PACKAGE_BZip2
"lzma" CMAKE_DISABLE_FIND_PACKAGE_LibLZMA
"lz4" CMAKE_DISABLE_FIND_PACKAGE_LZ4
"zstd" CMAKE_DISABLE_FIND_PACKAGE_Zstd
"snappy" CMAKE_DISABLE_FIND_PACKAGE_Snappy
"libsodium" CMAKE_DISABLE_FIND_PACKAGE_unofficial-sodium
)

vcpkg_cmake_configure(
SOURCE_PATH ${SOURCE_PATH}
Expand Down
2 changes: 1 addition & 1 deletion ports/folly/vcpkg.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "folly",
"version-string": "2022.10.31.00",
"port-version": 1,
"port-version": 2,
"description": "An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows",
"homepage": "https://github.com/facebook/folly",
"license": "Apache-2.0",
Expand Down
2 changes: 1 addition & 1 deletion versions/baseline.json
Original file line number Diff line number Diff line change
Expand Up @@ -2382,7 +2382,7 @@
},
"folly": {
"baseline": "2022.10.31.00",
"port-version": 1
"port-version": 2
},
"font-chef": {
"baseline": "1.1.0",
Expand Down
5 changes: 5 additions & 0 deletions versions/f-/folly.json
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "fe39202619449823918182d7eb34a7eab60e1f59",
"version-string": "2022.10.31.00",
"port-version": 2
},
{
"git-tree": "93e3787e5d3b5f22d58c029919d3654f9c6b1500",
"version-string": "2022.10.31.00",
Expand Down

0 comments on commit 9d145e8

Please sign in to comment.