diff options
author | Alexey Edelev <alexey.edelev@qt.io> | 2022-05-25 15:52:23 +0200 |
---|---|---|
committer | Mårten Nordheim <marten.nordheim@qt.io> | 2022-09-08 10:27:54 +0200 |
commit | ad84c5cb8a02acc8ee98871b06e1207418dd0afd (patch) | |
tree | fdac3f2b2e1c0d57bd038e78bbb29da607c2a806 | |
parent | b09cac44488986dbf3e1b3fb7eafaee71117099a (diff) |
Update protobuf provisioning scripts
Enable protobuf provisioning for all linux platforms, since it's
required to build qtbase with protobuf support.
Delete install_protobuff for macos 10.14 since it's not used and
wouldn't build without special casing.
Change-Id: I9c7dea876c45dbcbfc3110b106ae683bbe9179ec
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
-rwxr-xr-x | coin/provisioning/common/unix/install_protobuff.sh | 28 | ||||
-rwxr-xr-x | coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/60-install_protobuff.sh (renamed from coin/provisioning/qtci-macos-10.14-x86_64/35-install_protobuff.sh) | 0 | ||||
-rwxr-xr-x | coin/provisioning/qtci-linux-Ubuntu-20.04-x86_64/60-install_protobuff.sh | 46 | ||||
-rwxr-xr-x | coin/provisioning/qtci-linux-openSUSE-15.3-x86_64/60-install_protobuff.sh | 46 |
4 files changed, 112 insertions, 8 deletions
diff --git a/coin/provisioning/common/unix/install_protobuff.sh b/coin/provisioning/common/unix/install_protobuff.sh index fb5ae853..eb5dea24 100755 --- a/coin/provisioning/common/unix/install_protobuff.sh +++ b/coin/provisioning/common/unix/install_protobuff.sh @@ -44,7 +44,14 @@ source "${BASH_SOURCE%/*}/DownloadURL.sh" # shellcheck source=./SetEnvVar.sh source "${BASH_SOURCE%/*}/SetEnvVar.sh" -# This script will install Google's Protocal Buffers which is needed by Automotive Suite +# Extract cmake path from the environment +if uname -a |grep -q "Ubuntu"; then + source ~/.profile +else + source ~/.bashrc +fi + +# This script will install Google's Protocal Buffers version="3.6.1" sha1="44b8ba225f3b4dc45fb56d5881ec6a91329802b6" @@ -63,15 +70,19 @@ if uname -a |grep -qv "Darwin"; then fi echo "Configuring and building protobuf" -cd "$targetDir" + +installPrefix="/usr/local" if uname -a |grep -q Darwin; then - ./configure --prefix "$(xcrun --sdk macosx --show-sdk-path)/usr/local" - SetEnvVar PATH "\$PATH:$(xcrun --sdk macosx --show-sdk-path)/usr/local/bin" -else - ./configure + extraCMakeArgs=-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" + SetEnvVar PATH "\$PATH:$installPrefix/bin" fi -make -j5 -sudo make install + +buildDir="$HOME/build-protobuf-$version" +mkdir "$buildDir" +cd "$buildDir" +cmake $targetDir/cmake -G"Ninja Multi-Config" -DCMAKE_INSTALL_PREFIX=$installPrefix $extraCMakeArgs -Dprotobuf_BUILD_TESTS=OFF -Dprotobuf_BUILD_EXAMPLES=OFF -Dprotobuf_BUILD_PROTOC_BINARIES=ON -DBUILD_SHARED_LIBS=OFF -Dprotobuf_WITH_ZLIB=OFF -DCMAKE_CONFIGURATION_TYPES="Release;Debug;RelWithDebugInfo" -DCMAKE_CROSS_CONFIGS=all -DCMAKE_DEFAULT_CONFIGS=all +ninja all:all +sudo env "PATH=$PATH" ninja install:all # Refresh shared library cache if OS isn't macOS if uname -a |grep -qv "Darwin"; then @@ -79,3 +90,4 @@ if uname -a |grep -qv "Darwin"; then fi sudo rm -r "$targetDir" +sudo rm -r "$buildDir" diff --git a/coin/provisioning/qtci-macos-10.14-x86_64/35-install_protobuff.sh b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/60-install_protobuff.sh index 2f55353a..2f55353a 100755 --- a/coin/provisioning/qtci-macos-10.14-x86_64/35-install_protobuff.sh +++ b/coin/provisioning/qtci-linux-Ubuntu-18.04-x86_64/60-install_protobuff.sh diff --git a/coin/provisioning/qtci-linux-Ubuntu-20.04-x86_64/60-install_protobuff.sh b/coin/provisioning/qtci-linux-Ubuntu-20.04-x86_64/60-install_protobuff.sh new file mode 100755 index 00000000..2f55353a --- /dev/null +++ b/coin/provisioning/qtci-linux-Ubuntu-20.04-x86_64/60-install_protobuff.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +############################################################################# +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the provisioning scripts of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 3 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL3 included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 3 requirements +## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 2.0 or (at your option) the GNU General +## Public license version 3 or any later version approved by the KDE Free +## Qt Foundation. The licenses are as published by the Free Software +## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-2.0.html and +## https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +set -ex + +# shellcheck source=../common/unix/install_protobuff.sh +source "${BASH_SOURCE%/*}/../common/unix/install_protobuff.sh" + diff --git a/coin/provisioning/qtci-linux-openSUSE-15.3-x86_64/60-install_protobuff.sh b/coin/provisioning/qtci-linux-openSUSE-15.3-x86_64/60-install_protobuff.sh new file mode 100755 index 00000000..2f55353a --- /dev/null +++ b/coin/provisioning/qtci-linux-openSUSE-15.3-x86_64/60-install_protobuff.sh @@ -0,0 +1,46 @@ +#!/usr/bin/env bash + +############################################################################# +## +## Copyright (C) 2018 The Qt Company Ltd. +## Contact: https://www.qt.io/licensing/ +## +## This file is part of the provisioning scripts of the Qt Toolkit. +## +## $QT_BEGIN_LICENSE:LGPL$ +## Commercial License Usage +## Licensees holding valid commercial Qt licenses may use this file in +## accordance with the commercial license agreement provided with the +## Software or, alternatively, in accordance with the terms contained in +## a written agreement between you and The Qt Company. For licensing terms +## and conditions see https://www.qt.io/terms-conditions. For further +## information use the contact form at https://www.qt.io/contact-us. +## +## GNU Lesser General Public License Usage +## Alternatively, this file may be used under the terms of the GNU Lesser +## General Public License version 3 as published by the Free Software +## Foundation and appearing in the file LICENSE.LGPL3 included in the +## packaging of this file. Please review the following information to +## ensure the GNU Lesser General Public License version 3 requirements +## will be met: https://www.gnu.org/licenses/lgpl-3.0.html. +## +## GNU General Public License Usage +## Alternatively, this file may be used under the terms of the GNU +## General Public License version 2.0 or (at your option) the GNU General +## Public license version 3 or any later version approved by the KDE Free +## Qt Foundation. The licenses are as published by the Free Software +## Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3 +## included in the packaging of this file. Please review the following +## information to ensure the GNU General Public License requirements will +## be met: https://www.gnu.org/licenses/gpl-2.0.html and +## https://www.gnu.org/licenses/gpl-3.0.html. +## +## $QT_END_LICENSE$ +## +############################################################################# + +set -ex + +# shellcheck source=../common/unix/install_protobuff.sh +source "${BASH_SOURCE%/*}/../common/unix/install_protobuff.sh" + |