Skip to content

Commit

Permalink
cmake: Automatically build tesseract.rc with version from file
Browse files Browse the repository at this point in the history
Signed-off-by: Stefan Weil <[email protected]>
  • Loading branch information
stweil committed Mar 28, 2018
1 parent 2cc46fa commit 8701b15
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -123,6 +123,9 @@ set(INCLUDE_DIR "${CMAKE_INSTALL_PREFIX}/include" "${CMAKE_INSTALL_PREFIX}/inclu
configure_file(
${CMAKE_SOURCE_DIR}/api/version.h.in
${CMAKE_BINARY_DIR}/api/version.h @ONLY)
configure_file(
${CMAKE_SOURCE_DIR}/vs2010/tesseract/tesseract.rc.in
${CMAKE_BINARY_DIR}/vs2010/tesseract/tesseract.rc @ONLY)
configure_file(
${CMAKE_SOURCE_DIR}/cmake/templates/TesseractConfig-version.cmake.in
${CMAKE_BINARY_DIR}/TesseractConfig-version.cmake @ONLY)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ END
//

VS_VERSION_INFO VERSIONINFO
FILEVERSION 4,0,0,0
PRODUCTVERSION 4,0,0,0
FILEVERSION @GENERIC_MAJOR_VERSION@,@GENERIC_MINOR_VERSION@,@GENERIC_MICRO_VERSION@,0
PRODUCTVERSION @GENERIC_MAJOR_VERSION@,@GENERIC_MINOR_VERSION@,@GENERIC_MICRO_VERSION@,0
FILEFLAGSMASK 0x17L
#ifdef _DEBUG
FILEFLAGS 0x1L
Expand All @@ -70,12 +70,12 @@ BEGIN
BLOCK "040904b0"
BEGIN
VALUE "FileDescription", "Tesseract command-line OCR engine"
VALUE "FileVersion", "4,0,0,0"
VALUE "FileVersion", "@GENERIC_MAJOR_VERSION@,@GENERIC_MINOR_VERSION@,@GENERIC_MICRO_VERSION@,0"
VALUE "InternalName", "tesseract"
VALUE "LegalCopyright", "Copyright (C) 2016 Google, Inc. Licensed under the Apache License, Version 2.0"
VALUE "OriginalFilename", "tesseract.exe"
VALUE "ProductName", "Tesseract-OCR"
VALUE "ProductVersion", "4.0.0-beta.1"
VALUE "ProductVersion", "@PACKAGE_VERSION@"
END
END
BLOCK "VarFileInfo"
Expand Down

0 comments on commit 8701b15

Please sign in to comment.