mirror of
git://code.qt.io/qt/qt5.git
synced 2026-02-01 19:36:04 +08:00
Use correct path for libiodbc and forward via ODBC_ROOT env var
The hard-coded path paths added to LIBRARY_PATH and CPLUS_INCLUDE_PATH was not correct on Apple Silicon Macs, where homebrew installs into /opt/homebrew/. There's also no point in passing on the library location via compiler environment variables, when we can use ODBC_ROOT. And we don't need to pass it on as a CMake define, as a environment variable works just fine. This decouples the provisioning of libiodbc from the build configurations. Change-Id: I40aa3c1852fb0baf3366fa1a9dab85a66eef95e2 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io> Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io> (cherry picked from commit124957a8cb) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit1bb142175a)
This commit is contained in:
committed by
Qt Cherry-pick Bot
parent
3cf6241e47
commit
e8a94de2ea
@@ -1,5 +1,5 @@
|
||||
#!/usr/bin/env bash
|
||||
# Copyright (C) 2018 The Qt Company Ltd.
|
||||
# Copyright (C) 2025 The Qt Company Ltd.
|
||||
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
|
||||
|
||||
# Install libiodbc
|
||||
@@ -11,12 +11,9 @@ source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
|
||||
|
||||
brew install --formula "${BASH_SOURCE%/*}/libiodbc.rb" "$@"
|
||||
|
||||
# CPLUS_INCLUDE_PATH is set so clang and configure can find libiodbc
|
||||
|
||||
read -r -a arr <<< "$(brew list --versions libiodbc)"
|
||||
version=${arr[1]}
|
||||
|
||||
SetEnvVar "CPLUS_INCLUDE_PATH" "/usr/local/Cellar/libiodbc/$version/include${CPLUS_INCLUDE_PATH:+:}${CPLUS_INCLUDE_PATH}"
|
||||
SetEnvVar "LIBRARY_PATH" "/usr/local/Cellar/libiodbc/$version/lib${LIBRARY_PATH:+:}${LIBRARY_PATH}"
|
||||
SetEnvVar "ODBC_ROOT" "$(brew --prefix libiodbc)"
|
||||
|
||||
echo "libiodbc = $version" >> ~/versions.txt
|
||||
|
||||
Reference in New Issue
Block a user