From d2c35ce4cb6ff767712a879f6bfad9d50ada577d Mon Sep 17 00:00:00 2001 From: Jozef Izso Date: Wed, 15 Aug 2018 15:50:45 +0200 Subject: Backport the PR #4579 to 3.6.x branch Implements #3380 --- cmake/protoc.cmake | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'cmake/protoc.cmake') diff --git a/cmake/protoc.cmake b/cmake/protoc.cmake index 5777b16e..9bf6f5a9 100644 --- a/cmake/protoc.cmake +++ b/cmake/protoc.cmake @@ -2,6 +2,13 @@ set(protoc_files ${protobuf_source_dir}/src/google/protobuf/compiler/main.cc ) -add_executable(protoc ${protoc_files}) +set(protoc_rc_files + ${CMAKE_CURRENT_BINARY_DIR}/version.rc +) + +add_executable(protoc ${protoc_files} ${protoc_rc_files}) target_link_libraries(protoc libprotobuf libprotoc) add_executable(protobuf::protoc ALIAS protoc) + +set_target_properties(protoc PROPERTIES + VERSION ${protobuf_VERSION}) -- cgit v1.2.3