Skip to content

Commit d5c5aeb

Browse files
committed
👔 Fix target redefinition
Ensure that protobuf::libprotobuf-lite, protobuf::libprotobuf, protobuf::libprotoc, protobuf::protoc are defined only once.
1 parent 86a0782 commit d5c5aeb

File tree

3 files changed

+2
-7
lines changed

3 files changed

+2
-7
lines changed

CMakeLists.txt

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,6 @@ message("Qv2ray Version: ${_QV2RAY_BUILD_INFO_STR_} - ${_QV2RAY_BUILD_EXTRA_INFO
256256
include(cmake/libuv.cmake)
257257
include(cmake/libcurl.cmake)
258258
include(cmake/libsemver.cmake)
259-
include(cmake/protobuf.cmake)
260259
include(cmake/backend.cmake)
261260
include(3rdparty/QJsonStruct/QJsonStruct.cmake)
262261

@@ -315,7 +314,6 @@ add_library(qv2ray_baselib STATIC
315314

316315
target_link_libraries(qv2ray_baselib
317316
${QV2RAY_QT_LIBS}
318-
${QV2RAY_PROTOBUF_LIBRARY}
319317
${QV2RAY_BACKEND_LIBRARY}
320318
${LibUV_LIBRARIES}
321319
${CURL_LIBRARIES}

cmake/backend.cmake

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
find_program(GRPC_CPP_PLUGIN grpc_cpp_plugin)
22

33
find_package(gRPC CONFIG QUIET)
4+
find_package(Protobuf REQUIRED)
5+
protobuf_generate_cpp(PROTO_SRCS PROTO_HDRS ${CMAKE_SOURCE_DIR}/assets/v2ray_geosite.proto)
46

57
# Debian, for example, cannot find gRPC in a proper way.
68
# This is used as a fallback searching method

cmake/protobuf.cmake

Lines changed: 0 additions & 5 deletions
This file was deleted.

0 commit comments

Comments
 (0)