Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Kitware
GitHub Repository: Kitware/CMake
Path: blob/master/Utilities/Release/macos/qt-5.15.2-macosx10.13-x86_64-arm64.bash
3153 views
1
#!/usr/bin/env bash
2
3
# Run this script on a macOS x86_64 host to generate Qt universal binaries.
4
#
5
# This script requires the 'makeuniversal' tool from:
6
#
7
# https://github.com/fizzyade/makeuniversal
8
#
9
# Build it with an existing local Qt installation first.
10
#
11
# Set the PATH environment variable to contain the location of 'makeuniversal'.
12
13
set -e
14
set -x
15
16
umask 022
17
18
# Verify that 'makeuniversal' is available in the PATH.
19
type -p makeuniversal >/dev/null
20
21
# Download, verify, and extract sources.
22
curl -OL https://download.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz
23
shasum -a 256 qt-everywhere-src-5.15.2.tar.xz | grep -q 3a530d1b243b5dec00bc54937455471aaa3e56849d2593edb8ded07228202240
24
tar xjf qt-everywhere-src-5.15.2.tar.xz
25
26
# Build the x86_64 variant.
27
mkdir qt-5.15.2-x86_64
28
cd qt-5.15.2-x86_64
29
../qt-everywhere-src-5.15.2/configure \
30
--prefix=/ \
31
-platform macx-clang \
32
-device-option QMAKE_APPLE_DEVICE_ARCHS=x86_64 \
33
-device-option QMAKE_MACOSX_DEPLOYMENT_TARGET=10.13 \
34
-release \
35
-opensource -confirm-license \
36
-gui \
37
-widgets \
38
-no-gif \
39
-no-icu \
40
-no-pch \
41
-no-angle \
42
-no-opengl \
43
-no-dbus \
44
-no-harfbuzz \
45
-skip declarative \
46
-skip multimedia \
47
-skip qtcanvas3d \
48
-skip qtcharts \
49
-skip qtconnectivity \
50
-skip qtdeclarative \
51
-skip qtgamepad \
52
-skip qtlocation \
53
-skip qtmultimedia \
54
-skip qtnetworkauth \
55
-skip qtpurchasing \
56
-skip qtremoteobjects \
57
-skip qtscript \
58
-skip qtsensors \
59
-skip qtserialbus \
60
-skip qtserialport \
61
-skip qtsvg \
62
-skip qtwebchannel \
63
-skip qtwebengine \
64
-skip qtwebsockets \
65
-skip qtxmlpatterns \
66
-nomake examples \
67
-nomake tests \
68
-nomake tools
69
make -j 8
70
cd ..
71
72
# Build the arm64 variant.
73
mkdir qt-5.15.2-arm64
74
cd qt-5.15.2-arm64
75
../qt-everywhere-src-5.15.2/configure \
76
--prefix=/ \
77
-platform macx-clang \
78
-device-option QMAKE_APPLE_DEVICE_ARCHS=arm64 \
79
-device-option QMAKE_MACOSX_DEPLOYMENT_TARGET=10.13 \
80
-release \
81
-opensource -confirm-license \
82
-gui \
83
-widgets \
84
-no-gif \
85
-no-icu \
86
-no-pch \
87
-no-angle \
88
-no-opengl \
89
-no-dbus \
90
-no-harfbuzz \
91
-skip declarative \
92
-skip multimedia \
93
-skip qtcanvas3d \
94
-skip qtcharts \
95
-skip qtconnectivity \
96
-skip qtdeclarative \
97
-skip qtgamepad \
98
-skip qtlocation \
99
-skip qtmultimedia \
100
-skip qtnetworkauth \
101
-skip qtpurchasing \
102
-skip qtremoteobjects \
103
-skip qtscript \
104
-skip qtsensors \
105
-skip qtserialbus \
106
-skip qtserialport \
107
-skip qtsvg \
108
-skip qtwebchannel \
109
-skip qtwebengine \
110
-skip qtwebsockets \
111
-skip qtxmlpatterns \
112
-nomake examples \
113
-nomake tests \
114
-nomake tools
115
make -j 8 -k
116
cd ..
117
118
# Combine the two builds into universal binaries.
119
makeuniversal qt-5.15.2-univ qt-5.15.2-x86_64 qt-5.15.2-arm64
120
cd qt-5.15.2-univ
121
make install -j 8 INSTALL_ROOT=/tmp/qt-5.15.2-macosx10.13-x86_64-arm64
122
cd ..
123
124
# Create the final tarball containing universal binaries.
125
tar cjf qt-5.15.2-macosx10.13-x86_64-arm64.tar.xz -C /tmp qt-5.15.2-macosx10.13-x86_64-arm64
126
127