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/CMakeLists.txt | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'cmake/CMakeLists.txt') diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt index 02174e96..ada9dc25 100644 --- a/cmake/CMakeLists.txt +++ b/cmake/CMakeLists.txt @@ -166,12 +166,23 @@ if (MSVC) add_definitions(/bigobj) string(REPLACE "/" "\\" PROTOBUF_SOURCE_WIN32_PATH ${protobuf_SOURCE_DIR}) string(REPLACE "/" "\\" PROTOBUF_BINARY_WIN32_PATH ${protobuf_BINARY_DIR}) + string(REPLACE "." "," protobuf_RC_FILEVERSION "${protobuf_VERSION}") configure_file(extract_includes.bat.in extract_includes.bat) # Suppress linker warnings about files with no symbols defined. set(CMAKE_STATIC_LINKER_FLAGS /ignore:4221) + + # Configure Resource Compiler + enable_language(RC) + # use English language (0x409) in resource compiler + set(rc_flags "/l0x409") + # fix rc.exe invocations because of usage of add_definitions() + set(CMAKE_RC_COMPILE_OBJECT " ${rc_flags} /fo ") + + configure_file(version.rc.in ${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY) endif (MSVC) + get_filename_component(protobuf_source_dir ${protobuf_SOURCE_DIR} PATH) include_directories( -- cgit v1.2.3