mirror of
https://github.com/crystalidea/qt-build-tools.git
synced 2025-05-09 22:21:22 +08:00
Compare commits
2 Commits
3b65ac6f9a
...
1442f09d6b
Author | SHA1 | Date | |
---|---|---|---|
|
1442f09d6b | ||
|
5ae93a018e |
@ -9,7 +9,7 @@ my @skipped_modules = qw(
|
||||
qtpositioning qtremoteobjects qtscxml qtsensors qtserialbus qtserialport
|
||||
qtsvg qttranslations qtvirtualkeyboard qtwayland qtwebchannel qtwebengine
|
||||
qtwebsockets qtwebview qtquickeffectmaker qtquicktimeline qtquick3d
|
||||
qtquick3dphysics qtgraphs
|
||||
qtquick3dphysics qtgraphs qtmultimedia qtdeclarative qtlanguageserver qtshadertools qttools
|
||||
);
|
||||
|
||||
# Subroutine to check if a command exists in PATH
|
||||
@ -58,11 +58,16 @@ if (!command_exists('cmake')) {
|
||||
}
|
||||
|
||||
my $build_dir = "qt6-build";
|
||||
my $install_dir = "/usr/local/Qt-6.8.1";
|
||||
|
||||
if (-d $build_dir) {
|
||||
die "Error: $build_dir already exists from the previous build\n";
|
||||
}
|
||||
|
||||
if (-d $install_dir) {
|
||||
die "Error: $install_dir already exists from the previous build\n";
|
||||
}
|
||||
|
||||
mkdir $build_dir or die "Error: Unable to create directory '$build_dir'.\n";
|
||||
chdir $build_dir or die "Error: Unable to change directory to '$build_dir'.\n";
|
||||
|
||||
@ -71,7 +76,13 @@ my $skip_modules_string = join(' ', map { "-skip $_" } @skipped_modules);
|
||||
|
||||
# Configure the build
|
||||
print "Configuring the build...\n";
|
||||
run_command("../configure $skip_modules_string -- -DCMAKE_OSX_ARCHITECTURES=\"x86_64;arm64\"");
|
||||
|
||||
my $build_archs = "-DCMAKE_OSX_ARCHITECTURES=\"x86_64;arm64\"";
|
||||
# NOTE: if $build_archs is empty, Qt is defaults to x86_64 on an arm64 machine, which is not what described in the docs:
|
||||
# https://doc.qt.io/qt-6/macos-building.html
|
||||
my $build_etc = "-DBUILD_TESTING=OFF";
|
||||
|
||||
run_command("../configure $skip_modules_string -no-framework -- $build_archs $build_etc");
|
||||
|
||||
# Build Qt6
|
||||
print "Building Qt6...\n";
|
||||
|
Loading…
x
Reference in New Issue
Block a user