aboutsummaryrefslogtreecommitdiffhomepage
path: root/cmake/CMakeLists.txt
diff options
context:
space:
mode:
authorGravatar Jozef Izso <jozef.izso@gmail.com>2018-04-27 23:44:38 +0200
committerGravatar Jozef Izso <jozef.izso@gmail.com>2018-04-27 23:44:38 +0200
commit3415201d1dce9f7dc1ed0547ddf083d122a1271c (patch)
treede4f277312ffbcfb2de4bd8e001c15eb3852a5a3 /cmake/CMakeLists.txt
parentfc922d16ed7ae3c19defe82228a9760f3d8d1073 (diff)
Add file information to Windows binaries
Diffstat (limited to 'cmake/CMakeLists.txt')
-rw-r--r--cmake/CMakeLists.txt13
1 files changed, 12 insertions, 1 deletions
diff --git a/cmake/CMakeLists.txt b/cmake/CMakeLists.txt
index 02429fb1..dfec0d78 100644
--- a/cmake/CMakeLists.txt
+++ b/cmake/CMakeLists.txt
@@ -162,12 +162,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 "<CMAKE_RC_COMPILER> ${rc_flags} <DEFINES> /fo<OBJECT> <SOURCE>")
+
+ 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(