Files
qt5/coin/provisioning/common/macos/libiodbc.sh
Tor Arne Vestbø 1bb142175a 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.

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>
2025-02-02 23:32:28 +00:00

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