mirror of
https://github.com/microsoft/vcpkg.git
synced 2025-01-18 13:03:01 +08:00
[nanodbc] enable unixODBC dependecy from vcpkg (#21433)
This commit is contained in:
parent
745febc562
commit
fd5854751d
24
ports/nanodbc/find-unixodbc.patch
Normal file
24
ports/nanodbc/find-unixodbc.patch
Normal 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")
|
@ -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")
|
||||
|
||||
|
@ -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": [
|
||||
|
@ -4586,7 +4586,7 @@
|
||||
},
|
||||
"nanodbc": {
|
||||
"baseline": "2.13.0",
|
||||
"port-version": 5
|
||||
"port-version": 6
|
||||
},
|
||||
"nanoflann": {
|
||||
"baseline": "1.3.2",
|
||||
|
@ -1,5 +1,10 @@
|
||||
{
|
||||
"versions": [
|
||||
{
|
||||
"git-tree": "7de6296fc337f181517f8ed4c2e6ed35d749e414",
|
||||
"version": "2.13.0",
|
||||
"port-version": 6
|
||||
},
|
||||
{
|
||||
"git-tree": "82bfc56de1430aa6fec9c27925d46a72e1b800a0",
|
||||
"version": "2.13.0",
|
||||
|
Loading…
Reference in New Issue
Block a user