mirror of
https://github.com/microsoft/vcpkg.git
synced 2024-12-27 10:21:07 +08:00
[fbthrift]: fix dependency (#30800)
* [fbthrift]: fix dependency * fix deps * fix fbthrift
This commit is contained in:
parent
6913327612
commit
7947b1c828
58
ports/fbthrift/0002-fix-dependency.patch
Normal file
58
ports/fbthrift/0002-fix-dependency.patch
Normal file
@ -0,0 +1,58 @@
|
||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||
index beae7d7..0d03162 100644
|
||||
--- a/CMakeLists.txt
|
||||
+++ b/CMakeLists.txt
|
||||
@@ -100,7 +100,8 @@ endif ()
|
||||
|
||||
# Find required dependencies for thrift/lib
|
||||
if(lib_only OR build_all)
|
||||
- find_package(Gflags REQUIRED)
|
||||
+ find_package(gflags CONFIG REQUIRED)
|
||||
+ set(LIBGFLAGS_LIBRARY gflags::gflags)
|
||||
find_package(glog CONFIG REQUIRED)
|
||||
set (GLOG_LIBRARIES glog::glog)
|
||||
find_package(folly CONFIG REQUIRED)
|
||||
@@ -108,16 +109,17 @@ if(lib_only OR build_all)
|
||||
find_package(fmt CONFIG REQUIRED)
|
||||
find_package(wangle CONFIG REQUIRED)
|
||||
find_package(ZLIB REQUIRED)
|
||||
- find_package(Zstd REQUIRED)
|
||||
+ find_package(zstd CONFIG REQUIRED)
|
||||
+ if(TARGET zstd::libzstd_shared)
|
||||
+ set(ZSTD_LIBRARIES zstd::libzstd_shared)
|
||||
+ elseif(TARGET zstd::libzstd_static)
|
||||
+ set(ZSTD_LIBRARIES zstd::libzstd_static)
|
||||
+ endif()
|
||||
+
|
||||
# https://cmake.org/cmake/help/v3.9/module/FindThreads.html
|
||||
set(THREADS_PREFER_PTHREAD_FLAG ON)
|
||||
find_package(Threads)
|
||||
include_directories(
|
||||
- ${LIBGFLAGS_INCLUDE_DIR}
|
||||
- ${GLOG_INCLUDE_DIRS}
|
||||
- ${OPENSSL_INCLUDE_DIR}
|
||||
- ${ZSTD_INCLUDE_DIRS}
|
||||
- ${Boost_INCLUDE_DIRS}
|
||||
)
|
||||
add_definitions("-DTHRIFT_HAVE_LIBSNAPPY=0")
|
||||
if(lib_only)
|
||||
diff --git a/thrift/cmake/FBThriftConfig.cmake.in b/thrift/cmake/FBThriftConfig.cmake.in
|
||||
index e1297ed..c7d9d59 100644
|
||||
--- a/thrift/cmake/FBThriftConfig.cmake.in
|
||||
+++ b/thrift/cmake/FBThriftConfig.cmake.in
|
||||
@@ -28,7 +28,14 @@ else()
|
||||
set_and_check(FBTHRIFT_COMPILER "@PACKAGE_BIN_INSTALL_DIR@/thrift1")
|
||||
endif()
|
||||
|
||||
-find_dependency(ZLIB REQUIRED)
|
||||
+find_dependency(fizz CONFIG )
|
||||
+find_dependency(fmt CONFIG )
|
||||
+find_dependency(folly CONFIG )
|
||||
+find_dependency(gflags CONFIG)
|
||||
+find_dependency(glog CONFIG )
|
||||
+find_dependency(wangle CONFIG )
|
||||
+find_dependency(ZLIB)
|
||||
+find_dependency(zstd CONFIG)
|
||||
|
||||
if (NOT TARGET FBThrift::thriftcpp2)
|
||||
include("${FBTHRIFT_CMAKE_DIR}/FBThriftTargets.cmake")
|
@ -10,8 +10,18 @@ vcpkg_from_github(
|
||||
PATCHES
|
||||
0001-fix-compatibility-with-boost-1.79.0.patch
|
||||
fix-glog.patch
|
||||
0002-fix-dependency.patch
|
||||
)
|
||||
|
||||
file(REMOVE "${SOURCE_PATH}/thrift/cmake/FindGMock.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/thrift/cmake/FindOpenSSL.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/thrift/cmake/FindZstd.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindGflags.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindGlog.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindGMock.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindLibEvent.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindSodium.cmake")
|
||||
file(REMOVE "${SOURCE_PATH}/build/fbcode_builder/CMake/FindZstd.cmake")
|
||||
vcpkg_cmake_configure(
|
||||
SOURCE_PATH "${SOURCE_PATH}"
|
||||
OPTIONS
|
||||
|
@ -1,7 +1,7 @@
|
||||
{
|
||||
"name": "fbthrift",
|
||||
"version-string": "2022.03.21.00",
|
||||
"port-version": 2,
|
||||
"port-version": 3,
|
||||
"description": "Facebook's branch of Apache Thrift, including a new C++ server.",
|
||||
"homepage": "https://github.com/facebook/fbthrift",
|
||||
"license": "Apache-2.0",
|
||||
|
@ -2442,7 +2442,7 @@
|
||||
},
|
||||
"fbthrift": {
|
||||
"baseline": "2022.03.21.00",
|
||||
"port-version": 2
|
||||
"port-version": 3
|
||||
},
|
||||
"fcl": {
|
||||
"baseline": "0.7.0",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "74805d5c9147b3255703cdce511d9082cdfee016",
|
||||
"version-string": "2022.03.21.00",
|
||||
"port-version": 3
|
||||
},
|
||||
{
|
||||
"git-tree": "60135cc9f7a4bf698b67d275e1ad66a542d9acb4",
|
||||
"version-string": "2022.03.21.00",
|
||||
|
Loading…
x
Reference in New Issue
Block a user