This is an automated email from the ASF dual-hosted git repository.
isapego pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new 7b99d63e35 IGNITE-22660 Add meta info to ODBC dll (#4768)
7b99d63e35 is described below
commit 7b99d63e352fad30aca417411e05210c578db365
Author: Igor Sapego <[email protected]>
AuthorDate: Thu Nov 21 18:54:39 2024 +0400
IGNITE-22660 Add meta info to ODBC dll (#4768)
---
.gitignore | 2 -
modules/platforms/cpp/.gitignore | 1 +
modules/platforms/cpp/ignite/odbc/CMakeLists.txt | 18 ++++++---
modules/platforms/cpp/ignite/odbc/version.rc.in | 47 ++++++++++++++++++++++++
4 files changed, 61 insertions(+), 7 deletions(-)
diff --git a/.gitignore b/.gitignore
index 659be81852..9a8b1029fe 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,8 +21,6 @@ build/
*.ipr
out/
-modules/platforms/cpp/cmake-build-*
-
# JVM crash dumps
**/hs_err_pid*
diff --git a/modules/platforms/cpp/.gitignore b/modules/platforms/cpp/.gitignore
new file mode 100644
index 0000000000..4d0826aa02
--- /dev/null
+++ b/modules/platforms/cpp/.gitignore
@@ -0,0 +1 @@
+cmake-build-*
\ No newline at end of file
diff --git a/modules/platforms/cpp/ignite/odbc/CMakeLists.txt
b/modules/platforms/cpp/ignite/odbc/CMakeLists.txt
index 53e4946400..ea7ff8ce87 100644
--- a/modules/platforms/cpp/ignite/odbc/CMakeLists.txt
+++ b/modules/platforms/cpp/ignite/odbc/CMakeLists.txt
@@ -53,12 +53,20 @@ set(SOURCES
log.cpp
)
+set(EXTRA_FILES)
+
+if (WIN32)
+ string(REPLACE "." "," CMAKE_PROJECT_VERSION_COMMAS
${CMAKE_PROJECT_VERSION})
+ configure_file(${CMAKE_CURRENT_SOURCE_DIR}/version.rc.in
${CMAKE_CURRENT_BINARY_DIR}/version.rc @ONLY)
+ set(EXTRA_FILES ${CMAKE_CURRENT_BINARY_DIR}/version.rc)
+endif()
+
add_compile_definitions(CMAKE_PROJECT_VERSION="${CMAKE_PROJECT_VERSION}")
add_library(${TARGET}-obj OBJECT ${SOURCES})
target_include_directories(${TARGET}-obj PUBLIC ${CMAKE_CURRENT_SOURCE_DIR}
${ODBC_INCLUDE_DIRS})
-add_library(${TARGET} SHARED $<TARGET_OBJECTS:${TARGET}-obj> module.def)
+add_library(${TARGET} SHARED $<TARGET_OBJECTS:${TARGET}-obj> module.def
${EXTRA_FILES})
set(LIBRARIES
ignite-common
@@ -93,10 +101,10 @@ unset(_target_libs)
if (${INSTALL_IGNITE_FILES})
install(TARGETS ${TARGET}
- RUNTIME DESTINATION bin
- ARCHIVE DESTINATION lib
- LIBRARY DESTINATION lib
- )
+ RUNTIME DESTINATION bin
+ ARCHIVE DESTINATION lib
+ LIBRARY DESTINATION lib
+ )
endif()
ignite_test(connection_info_test DISCOVER SOURCES
config/connection_info_test.cpp LIBS ${TARGET}-obj ${LIBRARIES})
diff --git a/modules/platforms/cpp/ignite/odbc/version.rc.in
b/modules/platforms/cpp/ignite/odbc/version.rc.in
new file mode 100644
index 0000000000..d5ce82a3e6
--- /dev/null
+++ b/modules/platforms/cpp/ignite/odbc/version.rc.in
@@ -0,0 +1,47 @@
+#include <windows.h>
+
+#define VER_COMPANYNAME_STR "The Apache Software Foundation"
+#define VER_FILEDESCRIPTION_STR "The ODBC Driver for Apache Ignite 3"
+#define VER_PRODUCTNAME_STR "The Apache Ignite 3"
+
+#define VER_FILEVERSION @CMAKE_PROJECT_VERSION_COMMAS@,0
+#define VER_FILEVERSION_STR "@[email protected]\0"
+
+#define VER_PRODUCTVERSION @CMAKE_PROJECT_VERSION_COMMAS@,0
+#define VER_PRODUCTVERSION_STR "@CMAKE_PROJECT_VERSION@\0"
+
+#define VER_INTERNALNAME_STR "@PROJECT_NAME@"
+#define VER_ORIGINALFILENAME_STR "@[email protected]"
+
+VS_VERSION_INFO VERSIONINFO
+FILEVERSION VER_FILEVERSION
+PRODUCTVERSION VER_PRODUCTVERSION
+FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+FILEOS VOS__WINDOWS32
+FILETYPE VFT_DLL
+FILESUBTYPE VFT2_UNKNOWN
+BEGIN
+ BLOCK "StringFileInfo"
+ BEGIN
+ BLOCK "040904E4"
+ BEGIN
+ VALUE "CompanyName", VER_COMPANYNAME_STR
+ VALUE "FileDescription", VER_FILEDESCRIPTION_STR
+ VALUE "FileVersion", VER_FILEVERSION_STR
+ VALUE "InternalName", VER_INTERNALNAME_STR
+ VALUE "OriginalFilename", VER_ORIGINALFILENAME_STR
+ VALUE "ProductName", VER_PRODUCTNAME_STR
+ VALUE "ProductVersion", VER_PRODUCTVERSION_STR
+ END
+ END
+
+ BLOCK "VarFileInfo"
+ BEGIN
+ // The following line should only be modified for localized versions.
It consists of any number of WORDs,
+ // WORD pairs, with each pair describing a language, codepage
combination supported by the file.
+ //
+ // Current values "0x409,1252" indicating that it supports English
language (0x409) in the Windows ANSI
+ // codepage (1252).
+ VALUE "Translation", 0x409, 1252
+ END
+END
\ No newline at end of file