diff options
author | Feng Xiao <xfxyjwf@gmail.com> | 2018-08-20 13:37:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-08-20 13:37:38 -0700 |
commit | 5d38db4d514d41f8e1caceb2e20c2a6dfbc736b3 (patch) | |
tree | 6ade1f2bc31308c4c11116e4edd5a6fe02fc2638 /cmake/libprotobuf.cmake | |
parent | 859405a62b5058c0352dc608a7fd887f29f48afe (diff) | |
parent | d2c35ce4cb6ff767712a879f6bfad9d50ada577d (diff) | |
download | protobuf-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/libprotobuf.cmake')
-rw-r--r-- | cmake/libprotobuf.cmake | 8 |
1 files changed, 7 insertions, 1 deletions
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}) |