aboutsummaryrefslogtreecommitdiff
path: root/ports/brpc/fix_thrift.patch
blob: 699f42fb0aa0b96b8fa0bae88af74b14ecbd10e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 3deb7342..737f6a70 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -62,8 +62,10 @@ if(WITH_DEBUG_SYMBOLS)
 endif()
 
 if(WITH_THRIFT)
+    find_package(Thrift CONFIG REQUIRED)
+    # target_link_libraries(main PRIVATE thrift::thrift thriftz::thriftz thriftnb::thriftnb)
     set(THRIFT_CPP_FLAG "-DENABLE_THRIFT_FRAMED_PROTOCOL")
-    set(THRIFT_LIB "thrift")
+    set(THRIFT_LIB "thrift::thrift")
 endif()
 
 include(GNUInstallDirs)
@@ -196,9 +198,10 @@ set(DYNAMIC_LIB
     ${LEVELDB_LIB}
     ${PROTOC_LIB}
     ${CMAKE_THREAD_LIBS_INIT}
+    ${OPENSSL_CRYPTO_LIBRARY}
+    ${OPENSSL_SSL_LIBRARY}
     ${THRIFT_LIB}
     ${THRIFTNB_LIB}
-    ${OPENSSL_CRYPTO_LIBRARY}
     dl
     z)