Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -108,3 +108,6 @@ java/.mvn/.develocity/
# rat
filtered_rat.txt
rat.txt

# rc
*.rc
30 changes: 24 additions & 6 deletions cpp/src/arrow/flight/sql/odbc/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,28 @@ add_subdirectory(tests)

arrow_install_all_headers("arrow/flight/sql/odbc")

# ODBC Release information
set(ODBC_PACKAGE_VERSION_MAJOR "1")
set(ODBC_PACKAGE_VERSION_MINOR "0")
set(ODBC_PACKAGE_VERSION_PATCH "0")
set(ODBC_PACKAGE_NAME "Apache Arrow Flight SQL ODBC")
set(ODBC_PACKAGE_VENDOR "Apache Arrow")

set(ARROW_FLIGHT_SQL_ODBC_SRCS entry_points.cc odbc_api.cc)

if(WIN32)
list(APPEND ARROW_FLIGHT_SQL_ODBC_SRCS odbc.def)
set(VER_FILEVERSION
"${ODBC_PACKAGE_VERSION_MAJOR},${ODBC_PACKAGE_VERSION_MINOR},${ODBC_PACKAGE_VERSION_PATCH},0"
)
set(VER_FILEVERSION_STR
${ODBC_PACKAGE_VERSION_MAJOR}.${ODBC_PACKAGE_VERSION_MINOR}.${ODBC_PACKAGE_VERSION_PATCH}
)
set(VER_COMPANYNAME_STR ${ODBC_PACKAGE_VENDOR})
set(VER_PRODUCTNAME_STR ${ODBC_PACKAGE_NAME})

configure_file("install/versioninfo.rc.in" "install/versioninfo.rc" @ONLY)

list(APPEND ARROW_FLIGHT_SQL_ODBC_SRCS odbc.def install/versioninfo.rc)
endif()

add_arrow_lib(arrow_flight_sql_odbc
Expand Down Expand Up @@ -100,12 +118,12 @@ if(ARROW_FLIGHT_SQL_ODBC_INSTALLER)
set(CPACK_RESOURCE_FILE_LICENSE
"${CMAKE_CURRENT_SOURCE_DIR}/../../../../../../LICENSE.txt")
# Tentative version 1.0.0
set(CPACK_PACKAGE_VERSION_MAJOR "1")
set(CPACK_PACKAGE_VERSION_MINOR "0")
set(CPACK_PACKAGE_VERSION_PATCH "0")
set(CPACK_PACKAGE_VERSION_MAJOR ${ODBC_PACKAGE_VERSION_MAJOR})
set(CPACK_PACKAGE_VERSION_MINOR ${ODBC_PACKAGE_VERSION_MINOR})
set(CPACK_PACKAGE_VERSION_PATCH ${ODBC_PACKAGE_VERSION_PATCH})

set(CPACK_PACKAGE_NAME "Apache Arrow Flight SQL ODBC")
set(CPACK_PACKAGE_VENDOR "Apache Arrow")
set(CPACK_PACKAGE_NAME ${ODBC_PACKAGE_NAME})
set(CPACK_PACKAGE_VENDOR ${ODBC_PACKAGE_VENDOR})
set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Apache Arrow Flight SQL ODBC Driver")
set(CPACK_PACKAGE_CONTACT "#TODO arrow maintainers")

Expand Down
54 changes: 54 additions & 0 deletions cpp/src/arrow/flight/sql/odbc/install/versioninfo.rc.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
// Licensed to the Apache Software Foundation (ASF) under one
// or more contributor license agreements. See the NOTICE file
// distributed with this work for additional information
// regarding copyright ownership. The ASF licenses this file
// to you under the Apache License, Version 2.0 (the
// "License"); you may not use this file except in compliance
// with the License. You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing,
// software distributed under the License is distributed on an
// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, either express or implied. See the License for the
// specific language governing permissions and limitations
// under the License.

#define VER_FILEVERSION @VER_FILEVERSION@
#define VER_FILEVERSION_STR "@VER_FILEVERSION_STR@\0"

#define VER_PRODUCTVERSION @VER_FILEVERSION@

@rscales rscales Aug 23, 2025

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should the values be @VER_PRODUCTVERSION@ and @VER_PRODUCTVERSION_STR@

#define VER_PRODUCTVERSION_STR "@VER_FILEVERSION_STR@\0"

#define VER_COMPANYNAME_STR "@VER_COMPANYNAME_STR@\0"
#define VER_PRODUCTNAME_STR "@VER_PRODUCTNAME_STR@\0"

1 VERSIONINFO
FILEVERSION VER_FILEVERSION
PRODUCTVERSION VER_PRODUCTVERSION
BEGIN
BLOCK "StringFileInfo"
BEGIN
BLOCK "040904E4"
BEGIN
VALUE "CompanyName", VER_COMPANYNAME_STR
VALUE "FileVersion", VER_FILEVERSION_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 WORD,WORD pairs, with each pair */
/* describing a language,codepage combination supported by the file. */
/* */
/* For example, a file might have values "0x409,1252" indicating that it */
/* supports English language (0x409) in the Windows ANSI codepage (1252). */

VALUE "Translation", 0x409, 1252

END
END
Loading