diff options
Diffstat (limited to 'cmake/protoc.cmake')
-rw-r--r-- | cmake/protoc.cmake | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/cmake/protoc.cmake b/cmake/protoc.cmake index 5777b16e..bb160f47 100644 --- a/cmake/protoc.cmake +++ b/cmake/protoc.cmake @@ -2,6 +2,15 @@ set(protoc_files ${protobuf_source_dir}/src/google/protobuf/compiler/main.cc ) -add_executable(protoc ${protoc_files}) +if (MSVC) +set(protoc_rc_files + ${CMAKE_CURRENT_BINARY_DIR}/version.rc +) +endif() + +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}) |