zyearn commented on a change in pull request #830: move thrift  cmake build 
into cmake/FindThrift.cmake
URL: https://github.com/apache/incubator-brpc/pull/830#discussion_r299289388
 
 

 ##########
 File path: cmake/FindThrift.cmake
 ##########
 @@ -0,0 +1,22 @@
+set(THRIFT_CPP_FLAG "-DENABLE_THRIFT_FRAMED_PROTOCOL")
+
+# set by:export PATH="$PATH;...thrift/bin"
+find_program(THRIFT_BIN NAMES thrift)
+
+# set by:cmake ... -DCMAKE_INCLUDE_PATH="...;thrift/include" 
-DCMAKE_LIBRARY_PATH="...;thrift/lib"
+find_path(THRIFT_INCLUDE_PATH thrift/Thrift.h)
+
+set(_thrift_ORIG_CMAKE_FIND_LIBRARY_SUFFIXES ${CMAKE_FIND_LIBRARY_SUFFIXES})
+set(CMAKE_FIND_LIBRARY_SUFFIXES .a ${CMAKE_FIND_LIBRARY_SUFFIXES})
+
+# only use static libs 
+find_library(THRIFT_LIB NAMES thrift libthrift)
+find_library(THRIFTNB_LIB NAMES thriftnb libthriftnb)
 
 Review comment:
   libthrift and libthriftnb seem not used in brpc.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org
For additional commands, e-mail: dev-h...@brpc.apache.org

Reply via email to