vcpkg/ports/protobuf/version-rc-msvc.patch

17 lines
450 B
Diff
Raw Normal View History

2018-12-15 09:00:47 +08:00
diff --git a/cmake/protoc.cmake b/cmake/protoc.cmake
index 9bf6f5a..b58a12a 100644
--- a/cmake/protoc.cmake
+++ b/cmake/protoc.cmake
@@ -2,9 +2,11 @@ set(protoc_files
${protobuf_source_dir}/src/google/protobuf/compiler/main.cc
)
+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)