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/libprotobuf.cmake | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'cmake/libprotobuf.cmake') diff --git a/cmake/libprotobuf.cmake b/cmake/libprotobuf.cmake index 65d05c19..463d65a3 100644 --- a/cmake/libprotobuf.cmake +++ b/cmake/libprotobuf.cmake @@ -112,8 +112,14 @@ set(libprotobuf_includes ${protobuf_source_dir}/src/google/protobuf/wrappers.pb.h ) +if (MSVC) +set(libprotoc_rc_files + ${CMAKE_CURRENT_BINARY_DIR}/version.rc +) +endif() + add_library(libprotobuf ${protobuf_SHARED_OR_STATIC} - ${libprotobuf_lite_files} ${libprotobuf_files} ${libprotobuf_includes}) + ${libprotobuf_lite_files} ${libprotobuf_files} ${libprotobuf_includes} ${libprotobuf_rc_files}) target_link_libraries(libprotobuf ${CMAKE_THREAD_LIBS_INIT}) if(protobuf_WITH_ZLIB) target_link_libraries(libprotobuf ${ZLIB_LIBRARIES}) -- cgit v1.2.3