From 327edb829940a36d064f23afa92c7384d0fbb677 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=A9=BB=E9=AD=82=E5=9C=A3=E4=BD=BF?= Date: Fri, 26 Apr 2024 21:59:33 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=81=E8=AE=B8=E6=89=8B=E5=8A=A8=E6=8C=87?= =?UTF-8?q?=E5=AE=9Aprotobuf=E5=BA=93=E6=96=87=E4=BB=B6=E8=B7=AF=E5=BE=84?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/CMakeLists.txt | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 153277d..df3ff10 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -34,4 +34,9 @@ else () endif () target_include_directories(Transmission PUBLIC ${CMAKE_CURRENT_BINARY_DIR}) -target_link_libraries(Transmission protobuf proto lzma) \ No newline at end of file +if(NOT DEFINED PROTOBUF_LIB_PATH) + set(PROTOBUF_LIB_PATH "protobuf") +else () + message("手动指定protobuf库为${PROTOBUF_LIB_PATH}") +endif () +target_link_libraries(Transmission ${PROTOBUF_LIB_PATH} proto lzma) \ No newline at end of file