Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
P
protobuf
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
protobuf
Commits
3415201d
Commit
3415201d
authored
Apr 27, 2018
by
Jozef Izso
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add file information to Windows binaries
parent
fc922d16
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
63 additions
and
3 deletions
+63
-3
CMakeLists.txt
cmake/CMakeLists.txt
+12
-1
libprotobuf-lite.cmake
cmake/libprotobuf-lite.cmake
+2
-1
protoc.cmake
cmake/protoc.cmake
+4
-1
version.rc.in
cmake/version.rc.in
+45
-0
No files found.
cmake/CMakeLists.txt
View file @
3415201d
...
...
@@ -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
(
...
...
cmake/libprotobuf-lite.cmake
View file @
3415201d
...
...
@@ -49,7 +49,8 @@ set(libprotobuf_lite_includes
)
add_library
(
libprotobuf-lite
${
protobuf_SHARED_OR_STATIC
}
${
libprotobuf_lite_files
}
${
libprotobuf_lite_includes
}
)
${
libprotobuf_lite_files
}
${
libprotobuf_lite_includes
}
${
CMAKE_CURRENT_BINARY_DIR
}
/version.rc
)
target_link_libraries
(
libprotobuf-lite
${
CMAKE_THREAD_LIBS_INIT
}
)
target_include_directories
(
libprotobuf-lite PUBLIC
${
protobuf_source_dir
}
/src
)
if
(
MSVC AND protobuf_BUILD_SHARED_LIBS
)
...
...
cmake/protoc.cmake
View file @
3415201d
...
...
@@ -2,6 +2,9 @@ set(protoc_files
${
protobuf_source_dir
}
/src/google/protobuf/compiler/main.cc
)
add_executable
(
protoc
${
protoc_files
}
)
add_executable
(
protoc
${
protoc_files
}
${
CMAKE_CURRENT_BINARY_DIR
}
/version.rc
)
target_link_libraries
(
protoc libprotobuf libprotoc
)
add_executable
(
protobuf::protoc ALIAS protoc
)
set_target_properties
(
protoc PROPERTIES
VERSION
${
protobuf_VERSION
}
)
cmake/version.rc.in
0 → 100644
View file @
3415201d
#define VS_FF_DEBUG 0x1L
#define VS_VERSION_INFO 0x1L
#define VS_FFI_FILEFLAGSMASK 0x17L
#define VER_PRIVATEBUILD 0x0L
#define VER_PRERELEASE 0x0L
#define VOS__WINDOWS32 0x4L
#define VFT_DLL 0x2L
#define VFT2_UNKNOWN 0x0L
#ifndef DEBUG
#define VER_DEBUG 0
#else
#define VER_DEBUG VS_FF_DEBUG
#endif
VS_VERSION_INFO VERSIONINFO
FILEVERSION @protobuf_RC_FILEVERSION@,0
PRODUCTVERSION @protobuf_RC_FILEVERSION@,0
FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
FILEFLAGS VER_DEBUG
FILEOS VOS__WINDOWS32
FILETYPE VFT_DLL
BEGIN
BLOCK "VarFileInfo"
BEGIN
// English language (0x409) and the Windows Unicode codepage (1200)
VALUE "Translation", 0x409, 1200
END
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "Compiled with @CMAKE_CXX_COMPILER_ID@ @CMAKE_CXX_COMPILER_VERSION@\0"
VALUE "ProductVersion", "@protobuf_VERSION@\0"
VALUE "FileVersion", "@protobuf_VERSION@\0"
VALUE "InternalName", "protobuf\0"
VALUE "ProductName", "Protocol Buffers - Google's Data Interchange Format\0"
VALUE "CompanyName", "Google Inc.\0"
VALUE "LegalCopyright", "Copyright 2008 Google Inc. All rights reserved.\0"
VALUE "Licence", "BSD\0"
VALUE "Info", "https://developers.google.com/protocol-buffers/\0"
END
END
END
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment