mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-11-24 20:32:00 +08:00
[folly] Update to version 2018.03.19.00 (#3094)
* [folly] Update to version 2018.03.19.00 * [folly] Add zlib default feature. Disable unexpected packages and handle features.
This commit is contained in:
parent
ba47c71551
commit
6a3921c85a
@ -1,4 +1,29 @@
|
||||
Source: folly
|
||||
Version: 2017.11.27.00-3
|
||||
Version: 2018.03.19.00-1
|
||||
Description: An open-source C++ library developed and used at Facebook. The library is UNSTABLE on Windows
|
||||
Build-Depends: zlib, openssl, libevent, double-conversion, glog, gflags, lz4, liblzma, snappy, boost-context, boost-chrono, boost-date-time, boost-filesystem, boost-program-options, boost-regex, boost-system, boost-thread, boost-conversion, boost-multi-index, boost-crc
|
||||
Build-Depends: openssl, libevent, double-conversion, glog, gflags, boost-chrono, boost-context, boost-conversion, boost-crc, boost-date-time, boost-filesystem, boost-multi-index, boost-program-options, boost-regex, boost-system, boost-thread
|
||||
Default-Features: zlib
|
||||
|
||||
Feature: zlib
|
||||
Build-Depends: zlib
|
||||
Description: Support zlib for compression
|
||||
|
||||
Feature: bzip2
|
||||
Build-Depends: bzip2
|
||||
Description: Support bzip2 for compression
|
||||
|
||||
Feature: lzma
|
||||
Build-Depends: liblzma
|
||||
Description: Support LZMA for compression
|
||||
|
||||
Feature: zstd
|
||||
Build-Depends: zstd
|
||||
Description: Support zstd for compression
|
||||
|
||||
Feature: snappy
|
||||
Build-Depends: snappy
|
||||
Description: Support Snappy for compression
|
||||
|
||||
Feature: lz4
|
||||
Build-Depends: lz4
|
||||
Description: Support lz4 for compression
|
||||
|
@ -1,35 +0,0 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index ec5a985c..36564534 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -136,13 +136,6 @@ source_group("folly\\build" FILES
|
||||
)
|
||||
|
||||
set(FOLLY_SHINY_DEPENDENCIES
|
||||
- Boost::chrono
|
||||
- Boost::context
|
||||
- Boost::date_time
|
||||
- Boost::filesystem
|
||||
- Boost::program_options
|
||||
- Boost::regex
|
||||
- Boost::system
|
||||
OpenSSL::SSL
|
||||
OpenSSL::Crypto
|
||||
)
|
||||
@@ -179,6 +172,7 @@ endif()
|
||||
|
||||
set(FOLLY_LINK_LIBRARIES
|
||||
${FOLLY_LINK_LIBRARIES}
|
||||
+ ${Boost_LIBRARIES}
|
||||
Iphlpapi.lib
|
||||
Ws2_32.lib
|
||||
|
||||
@@ -320,7 +314,7 @@ if (BUILD_TESTS)
|
||||
)
|
||||
target_link_libraries(folly_test_support
|
||||
PUBLIC
|
||||
- Boost::thread
|
||||
+ ${Boost_LIBRARIES}
|
||||
folly
|
||||
${LIBGMOCK_LIBRARY}
|
||||
)
|
@ -17,45 +17,66 @@ set(ENV{PATH} "$ENV{PATH};${PYTHON3_DIR}")
|
||||
vcpkg_from_github(
|
||||
OUT_SOURCE_PATH SOURCE_PATH
|
||||
REPO facebook/folly
|
||||
REF v2017.11.27.00
|
||||
SHA512 738bb00047a7cbd807f2dccd64031763df80bbebca73f1ae9500b750dcad156dde84e47f4eda7af1bcd7abfae10c973da47515f2e111929979d1637869cf06ee
|
||||
REF v2018.03.19.00
|
||||
SHA512 72df8768753bf9f1109ad3f16645d811906b633833c91c7d9fe856a06c16b5e398876cf6cae415401eff96b568c99ffa1dc0c44d81cd40219bafb0f4c72fc2ca
|
||||
HEAD_REF master
|
||||
)
|
||||
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/cmake-link-boost-fix.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/msvc-15.6-workaround.patch
|
||||
)
|
||||
|
||||
file(COPY
|
||||
${CMAKE_CURRENT_LIST_DIR}/FindLZ4.cmake
|
||||
${CMAKE_CURRENT_LIST_DIR}/FindSnappy.cmake
|
||||
DESTINATION ${SOURCE_PATH}/CMake/
|
||||
)
|
||||
|
||||
if(VCPKG_CRT_LINKAGE STREQUAL static)
|
||||
set(MSVC_USE_STATIC_RUNTIME ON)
|
||||
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)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PREFER_NINJA
|
||||
OPTIONS
|
||||
-DMSVC_USE_STATIC_RUNTIME=${MSVC_USE_STATIC_RUNTIME}
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_LibDwarf=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_Libiberty=ON
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_LibAIO=ON
|
||||
-DLIBAIO_FOUND=OFF
|
||||
-DLIBURCU_FOUND=OFF
|
||||
-DCMAKE_DISABLE_FIND_PACKAGE_LibURCU=ON
|
||||
${FEATURE_OPTIONS}
|
||||
)
|
||||
|
||||
# Folly runs built executables during the build, so they need access to the installed DLLs.
|
||||
set(ENV{PATH} "$ENV{PATH};${CURRENT_INSTALLED_DIR}/bin;${CURRENT_INSTALLED_DIR}/debug/bin")
|
||||
|
||||
vcpkg_install_cmake()
|
||||
vcpkg_install_cmake(ADD_BIN_TO_PATH)
|
||||
|
||||
vcpkg_copy_pdbs()
|
||||
|
||||
vcpkg_fixup_cmake_targets()
|
||||
|
||||
# changes target search path
|
||||
file(READ ${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake FOLLY_MODULE)
|
||||
string(REPLACE "${CURRENT_INSTALLED_DIR}/lib/" "" FOLLY_MODULE "${FOLLY_MODULE}")
|
||||
file(WRITE ${CURRENT_PACKAGES_DIR}/share/folly/folly-targets.cmake "${FOLLY_MODULE}")
|
||||
|
||||
file(REMOVE_RECURSE ${CURRENT_PACKAGES_DIR}/debug/include)
|
||||
|
||||
# Handle copyright
|
||||
|
Loading…
Reference in New Issue
Block a user