mirror of
git://code.qt.io/qt/qt5.git
synced 2026-01-04 22:17:45 +08:00
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.
Pick-to: 6.8
Change-Id: I40aa3c1852fb0baf3366fa1a9dab85a66eef95e2
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
(cherry picked from commit 124957a8cb)
Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
20 lines
512 B
Bash
Executable File
20 lines
512 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# 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
|
|
|
|
set -ex
|
|
|
|
# shellcheck source=../unix/SetEnvVar.sh
|
|
source "${BASH_SOURCE%/*}/../unix/SetEnvVar.sh"
|
|
|
|
brew install --formula "${BASH_SOURCE%/*}/libiodbc.rb" "$@"
|
|
|
|
read -r -a arr <<< "$(brew list --versions libiodbc)"
|
|
version=${arr[1]}
|
|
|
|
SetEnvVar "ODBC_ROOT" "$(brew --prefix libiodbc)"
|
|
|
|
echo "libiodbc = $version" >> ~/versions.txt
|