aboutsummaryrefslogtreecommitdiff
path: root/cmake/protoc.cmake
diff options
context:
space:
mode:
authorFeng Xiao <xfxyjwf@gmail.com>2018-08-20 13:37:38 -0700
committerGitHub <noreply@github.com>2018-08-20 13:37:38 -0700
commit5d38db4d514d41f8e1caceb2e20c2a6dfbc736b3 (patch)
tree6ade1f2bc31308c4c11116e4edd5a6fe02fc2638 /cmake/protoc.cmake
parent859405a62b5058c0352dc608a7fd887f29f48afe (diff)
parentd2c35ce4cb6ff767712a879f6bfad9d50ada577d (diff)
downloadprotobuf-5d38db4d514d41f8e1caceb2e20c2a6dfbc736b3.tar.gz
protobuf-5d38db4d514d41f8e1caceb2e20c2a6dfbc736b3.tar.bz2
protobuf-5d38db4d514d41f8e1caceb2e20c2a6dfbc736b3.zip
Merge pull request #5048 from jozefizso/fix/4579_backport_for_3.6.x3.6.x
Include version information in Windows binaries (backport #4579 for 3.6.x)
Diffstat (limited to 'cmake/protoc.cmake')
-rw-r--r--cmake/protoc.cmake9
1 files changed, 8 insertions, 1 deletions
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})