[nanodbc] enable unixODBC dependecy from vcpkg (#21433)

This commit is contained in:
Michal Cepek 2021-11-17 01:41:50 +01:00 committed by GitHub
parent 745febc562
commit fd5854751d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 32 additions and 2 deletions

View File

@ -0,0 +1,24 @@
--- "a/CMakeLists.txt"
+++ "b/CMakeLists.txt"
@@ -110,6 +110,13 @@ message(STATUS "nanodbc feature: Enable SQL_NO_DATA bug workaround - ${NANODBC_E
## find unixODBC or iODBC config binary
########################################
if(UNIX)
+ # Try to find unixodbc package first
+ find_package(unixodbc)
+ if(unixodbc_FOUND)
+ message(STATUS "nanodbc build: unixODBC package found")
+ set(ODBCLIB UNIX::odbc)
+ set(ODBC_CONFIG true)
+ else()
# Try to find unixODBC first via odbc_config program.
find_program(ODBC_CONFIG odbc_config
PATHS $ENV{ODBC_PATH}/bin /usr/bin /usr/local/bin)
@@ -158,6 +165,7 @@ if(UNIX)
endif()
endif()
endif()
+ endif()
if(NOT ODBC_CONFIG)
message(FATAL_ERROR "can not find a suitable odbc driver manager")

View File

@ -11,6 +11,7 @@ vcpkg_from_github(
PATCHES
rename-version.patch
add-missing-include.patch
find-unixodbc.patch
)
file(RENAME "${SOURCE_PATH}/VERSION" "${SOURCE_PATH}/VERSION.txt")

View File

@ -1,7 +1,7 @@
{
"name": "nanodbc",
"version": "2.13.0",
"port-version": 5,
"port-version": 6,
"description": "A small C++ wrapper for the native C ODBC API.",
"homepage": "https://github.com/nanodbc/nanodbc",
"dependencies": [

View File

@ -4586,7 +4586,7 @@
},
"nanodbc": {
"baseline": "2.13.0",
"port-version": 5
"port-version": 6
},
"nanoflann": {
"baseline": "1.3.2",

View File

@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "7de6296fc337f181517f8ed4c2e6ed35d749e414",
"version": "2.13.0",
"port-version": 6
},
{
"git-tree": "82bfc56de1430aa6fec9c27925d46a72e1b800a0",
"version": "2.13.0",