sled/3party/protobuf-3.21.12/cmake/protoc.cmake
tqcq f8d2b051ee
All checks were successful
linux-x64-gcc / linux-gcc (Release) (push) Successful in 47s
linux-x64-gcc / linux-gcc (Debug) (push) Successful in 10m42s
feat add protobuf for C++11
2024-03-13 18:11:02 +08:00

14 lines
326 B
CMake

set(protoc_files
${protobuf_SOURCE_DIR}/src/google/protobuf/compiler/main.cc
)
add_executable(protoc ${protoc_files} ${protobuf_version_rc_file})
target_link_libraries(protoc
libprotoc
libprotobuf
)
add_executable(protobuf::protoc ALIAS protoc)
set_target_properties(protoc PROPERTIES
VERSION ${protobuf_VERSION})