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