summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-06-14 11:40:03 (GMT)
committerKitware Robot <kwrobot@kitware.com>2022-06-14 11:40:10 (GMT)
commit18687760f49dbffceb191c9a3955156215f86ab8 (patch)
tree9c055d43d91a457f2d11881ab0d00a5fe652ab33
parentc1957df97a722698e9fbb9258e5387695049032f (diff)
parentd084718eb93c1426393d574587f11373aaa7d94a (diff)
downloadCMake-18687760f49dbffceb191c9a3955156215f86ab8.zip
CMake-18687760f49dbffceb191c9a3955156215f86ab8.tar.gz
CMake-18687760f49dbffceb191c9a3955156215f86ab8.tar.bz2
Merge topic 'ci-rel-win-arm64' into release-3.24
d084718eb9 Utilities/Release: Add windows-arm64 package to file table 7a21173b0e gitlab-ci: Add job to build Windows arm64 binaries 06c6e76a12 ci: update to WiX 3.14.0.6526 cca3a73ef0 ci: Factor out Windows x86-family-specific package configuration add3dc9508 ci: Re-order logic for downloading Qt during packaging d0c9225a7e Utilities/Release: Add script to build Qt 6.3.0 Windows binaries Acked-by: Kitware Robot <kwrobot@kitware.com> Acked-by: buildbot <buildbot@kitware.com> Merge-request: !7360
-rw-r--r--.gitlab-ci.yml14
-rw-r--r--.gitlab/artifacts.yml1
-rw-r--r--.gitlab/ci/configure_windows_arm64_package.cmake16
-rw-r--r--.gitlab/ci/configure_windows_i386_package.cmake1
-rw-r--r--.gitlab/ci/configure_windows_package_common.cmake15
-rw-r--r--.gitlab/ci/configure_windows_package_common_x86.cmake13
-rw-r--r--.gitlab/ci/configure_windows_x86_64_package.cmake1
-rw-r--r--.gitlab/ci/download_qt.cmake14
-rw-r--r--.gitlab/ci/download_qt_hashes.cmake4
-rwxr-xr-x.gitlab/ci/wix.ps18
-rw-r--r--.gitlab/os-windows.yml23
-rw-r--r--Tests/RunCMake/CMakeRelease/FileTable-stdout.txt2
-rw-r--r--Utilities/Release/files-v1.json.in12
-rw-r--r--Utilities/Release/files-v1.rst2
-rwxr-xr-xUtilities/Release/win/qt-6.3.0-win-msvc.ps1135
15 files changed, 240 insertions, 21 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 5258ab3..fc05626 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1100,3 +1100,17 @@ u:windows-i386-package:
- k:windows-i386-package
needs:
- k:windows-i386-package
+
+b:windows-arm64-package:
+ extends:
+ - .windows_arm64_package
+ - .cmake_build_windows
+ - .cmake_build_package_artifacts
+ - .windows_tags_nonconcurrent_vs2022_arm64
+ - .run_only_for_package
+ dependencies:
+ - p:doc-package
+ needs:
+ - p:doc-package
+ variables:
+ CMAKE_CI_ARTIFACTS_NAME: "artifacts-windows-arm64-build"
diff --git a/.gitlab/artifacts.yml b/.gitlab/artifacts.yml
index e0c8252..1b5384f 100644
--- a/.gitlab/artifacts.yml
+++ b/.gitlab/artifacts.yml
@@ -105,6 +105,7 @@
- build/cmake-*-macos*-universal.*
- build/cmake-*-windows-x86_64.*
- build/cmake-*-windows-i386.*
+ - build/cmake-*-windows-arm64.*
# Any source packages made.
- build/cmake-*.tar.gz
- build/cmake-*.zip
diff --git a/.gitlab/ci/configure_windows_arm64_package.cmake b/.gitlab/ci/configure_windows_arm64_package.cmake
new file mode 100644
index 0000000..f3ce853
--- /dev/null
+++ b/.gitlab/ci/configure_windows_arm64_package.cmake
@@ -0,0 +1,16 @@
+# CPack package file name component for this platform.
+set(CPACK_SYSTEM_NAME "windows-arm64" CACHE STRING "")
+
+# Tell WiX to package for this architecture.
+set(CPACK_WIX_ARCHITECTURE "arm64" CACHE STRING "")
+
+# Use APIs from at most Windows 7
+set(CMAKE_C_FLAGS "-D_WIN32_WINNT=0x0A00 -DNTDDI_VERSION=0x0A000008" CACHE STRING "")
+set(CMAKE_CXX_FLAGS "-GR -EHsc -D_WIN32_WINNT=0x0A00 -DNTDDI_VERSION=0x0A000008" CACHE STRING "")
+set(CMAKE_EXE_LINKER_FLAGS "-machine:arm64 -subsystem:console,6.02" CACHE STRING "")
+
+set(qt "$ENV{CI_PROJECT_DIR}/.gitlab/qt")
+set(qt_host "$ENV{CI_PROJECT_DIR}/.gitlab/qt-host")
+set(CMAKE_PREFIX_PATH "${qt};${qt_host}" CACHE STRING "")
+
+include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_package_common.cmake")
diff --git a/.gitlab/ci/configure_windows_i386_package.cmake b/.gitlab/ci/configure_windows_i386_package.cmake
index 279f5cf..65e1dcb 100644
--- a/.gitlab/ci/configure_windows_i386_package.cmake
+++ b/.gitlab/ci/configure_windows_i386_package.cmake
@@ -6,4 +6,5 @@ set(CMAKE_C_FLAGS "-D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000" CACHE STRING
set(CMAKE_CXX_FLAGS "-GR -EHsc -D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000" CACHE STRING "")
set(CMAKE_EXE_LINKER_FLAGS "-machine:x86 -subsystem:console,6.01" CACHE STRING "")
+include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_package_common_x86.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_package_common.cmake")
diff --git a/.gitlab/ci/configure_windows_package_common.cmake b/.gitlab/ci/configure_windows_package_common.cmake
index cea0ba0..46c0a3e 100644
--- a/.gitlab/ci/configure_windows_package_common.cmake
+++ b/.gitlab/ci/configure_windows_package_common.cmake
@@ -6,22 +6,9 @@ set(CMAKE_DOC_DIR "doc/cmake" CACHE STRING "")
# Link C/C++ runtime library statically.
set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>" CACHE STRING "")
-# Enable cmake-gui with static qt plugins
+# Enable cmake-gui.
set(BUILD_QtDialog "TRUE" CACHE BOOL "")
set(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL "3" CACHE STRING "")
-set(qt "$ENV{CI_PROJECT_DIR}/.gitlab/qt")
-set(CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES
- ${qt}/plugins/platforms/qwindows.lib
- ${qt}/plugins/styles/qwindowsvistastyle.lib
- ${qt}/lib/Qt5EventDispatcherSupport.lib
- ${qt}/lib/Qt5FontDatabaseSupport.lib
- ${qt}/lib/Qt5ThemeSupport.lib
- ${qt}/lib/qtfreetype.lib
- ${qt}/lib/qtlibpng.lib
- imm32.lib
- wtsapi32.lib
- CACHE STRING "")
-set(CMAKE_PREFIX_PATH "${qt}" CACHE STRING "")
# Disable ccmake.
set(BUILD_CursesDialog "OFF" CACHE BOOL "")
diff --git a/.gitlab/ci/configure_windows_package_common_x86.cmake b/.gitlab/ci/configure_windows_package_common_x86.cmake
new file mode 100644
index 0000000..a8b5928
--- /dev/null
+++ b/.gitlab/ci/configure_windows_package_common_x86.cmake
@@ -0,0 +1,13 @@
+set(qt "$ENV{CI_PROJECT_DIR}/.gitlab/qt")
+set(CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES
+ ${qt}/plugins/platforms/qwindows.lib
+ ${qt}/plugins/styles/qwindowsvistastyle.lib
+ ${qt}/lib/Qt5EventDispatcherSupport.lib
+ ${qt}/lib/Qt5FontDatabaseSupport.lib
+ ${qt}/lib/Qt5ThemeSupport.lib
+ ${qt}/lib/qtfreetype.lib
+ ${qt}/lib/qtlibpng.lib
+ imm32.lib
+ wtsapi32.lib
+ CACHE STRING "")
+set(CMAKE_PREFIX_PATH "${qt}" CACHE STRING "")
diff --git a/.gitlab/ci/configure_windows_x86_64_package.cmake b/.gitlab/ci/configure_windows_x86_64_package.cmake
index b7bba85..3a141a7 100644
--- a/.gitlab/ci/configure_windows_x86_64_package.cmake
+++ b/.gitlab/ci/configure_windows_x86_64_package.cmake
@@ -6,4 +6,5 @@ set(CMAKE_C_FLAGS "-D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000" CACHE STRING
set(CMAKE_CXX_FLAGS "-GR -EHsc -D_WIN32_WINNT=0x601 -DNTDDI_VERSION=0x06010000" CACHE STRING "")
set(CMAKE_EXE_LINKER_FLAGS "-machine:x64 -subsystem:console,6.01" CACHE STRING "")
+include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_package_common_x86.cmake")
include("${CMAKE_CURRENT_LIST_DIR}/configure_windows_package_common.cmake")
diff --git a/.gitlab/ci/download_qt.cmake b/.gitlab/ci/download_qt.cmake
index 90c2187..b02ceb0 100644
--- a/.gitlab/ci/download_qt.cmake
+++ b/.gitlab/ci/download_qt.cmake
@@ -12,17 +12,22 @@ set(qt_version_nodot "${qt_version_major}${qt_version_minor}${qt_version_patch}"
# Files needed to download.
set(qt_files)
if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows.*package")
+ set(qt_url_root "https://cmake.org/files/dependencies")
+ set(qt_url_path "")
if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows_x86_64_package")
list(APPEND qt_files "qt-5.12.1-win-x86_64-msvc_v142-1.zip")
set(qt_subdir "qt-5.12.1-win-x86_64-msvc_v142-1")
elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows_i386_package")
list(APPEND qt_files "qt-5.12.1-win-i386-msvc_v142-1.zip")
set(qt_subdir "qt-5.12.1-win-i386-msvc_v142-1")
+ elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows_arm64_package")
+ list(APPEND qt_files "qt-6.3.0-win-arm64-msvc_v143-1.zip")
+ set(qt_subdir "qt-6.3.0-win-arm64-msvc_v143-1")
+ list(APPEND qt_files "qt-6.3.0-win-x86_64-msvc_v143-1.zip")
+ set(qt_host_subdir "qt-6.3.0-win-x86_64-msvc_v143-1")
else ()
message(FATAL_ERROR "Unknown arch to use for Qt")
endif()
- set(qt_url_root "https://cmake.org/files/dependencies")
- set(qt_url_path "")
elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows")
# Determine the ABI to fetch for Qt.
if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2015")
@@ -146,3 +151,8 @@ endif ()
file(RENAME
".gitlab/${qt_subdir}"
".gitlab/qt")
+if(qt_host_subdir)
+ file(RENAME
+ ".gitlab/${qt_host_subdir}"
+ ".gitlab/qt-host")
+endif()
diff --git a/.gitlab/ci/download_qt_hashes.cmake b/.gitlab/ci/download_qt_hashes.cmake
index d19d284..c4b0bd1 100644
--- a/.gitlab/ci/download_qt_hashes.cmake
+++ b/.gitlab/ci/download_qt_hashes.cmake
@@ -15,3 +15,7 @@ set("qt-5.15.2-macosx10.13-x86_64-arm64.tar.xz_hash" 7b9463a01c8beeee5bf8d01c70d
set("qt-5.12.1-win-i386-msvc_v142-1.zip_hash" aa78711fdaa5d9b146bf7ddcf15983f9fbb3f995462f2d043f8cca74b40ddd11)
set("qt-5.12.1-win-x86_64-msvc_v142-1.zip_hash" c2fc068b9dac40bb420e28e1ee15ce4f2ccfc866d767f3b99b6bb435b7c4f44b)
+
+set("qt-6.3.0-win-arm64-msvc_v143-1.zip_hash" 0950db703b0d305ff2855c69d8553e10036ebe5c65f95c4a850cf1f703410798)
+set("qt-6.3.0-win-i386-msvc_v143-1.zip_hash" 52d68ff3b8a045222b59ebe12878b8597e97019c2ae930e846ec816ce6df18db)
+set("qt-6.3.0-win-x86_64-msvc_v143-1.zip_hash" 3764a3076cf2331ec28bd88d6bddcab1578b1bb1329157bfe33ea02c2c63c6e1)
diff --git a/.gitlab/ci/wix.ps1 b/.gitlab/ci/wix.ps1
index a9322b6..a690533 100755
--- a/.gitlab/ci/wix.ps1
+++ b/.gitlab/ci/wix.ps1
@@ -1,14 +1,14 @@
$erroractionpreference = "stop"
-$release = "wix3112rtm"
-$sha256sum = "2C1888D5D1DBA377FC7FA14444CF556963747FF9A0A289A3599CF09DA03B9E2E"
-$filename = "wix311-binaries"
+$release = "v3.14.0.6526"
+$sha256sum = "4C89898DF3BCAB13E12F7CA54399C35AD273475AD2CB6284611D00AE2D063C2C"
+$filename = "wix314-binaries"
$tarball = "$filename.zip"
$outdir = $pwd.Path
$outdir = "$outdir\.gitlab"
$ProgressPreference = 'SilentlyContinue'
-Invoke-WebRequest -Uri "https://github.com/wixtoolset/wix3/releases/download/$release/$tarball" -OutFile "$outdir\$tarball"
+Invoke-WebRequest -Uri "https://wixtoolset.org/downloads/$release/$tarball" -OutFile "$outdir\$tarball"
$hash = Get-FileHash "$outdir\$tarball" -Algorithm SHA256
if ($hash.Hash -ne $sha256sum) {
exit 1
diff --git a/.gitlab/os-windows.yml b/.gitlab/os-windows.yml
index d55035f..b9b91fb 100644
--- a/.gitlab/os-windows.yml
+++ b/.gitlab/os-windows.yml
@@ -43,6 +43,12 @@
VCVARSPLATFORM: "x86"
VCVARSVERSION: "14.32.31326"
+.windows_vcvarsall_vs2022_x64_arm64:
+ variables:
+ VCVARSALL: "${VS170COMNTOOLS}\\..\\..\\VC\\Auxiliary\\Build\\vcvarsall.bat"
+ VCVARSPLATFORM: "x64_arm64"
+ VCVARSVERSION: "14.32.31326"
+
.windows_vs2022_x64_ninja:
extends:
- .windows_build_ninja
@@ -75,6 +81,14 @@
variables:
CMAKE_CONFIGURATION: windows_i386_package
+.windows_arm64_package:
+ extends:
+ - .windows_package
+ - .windows_vcvarsall_vs2022_x64_arm64
+
+ variables:
+ CMAKE_CONFIGURATION: windows_arm64_package
+
### External testing
.windows_vs2022_x64:
@@ -221,6 +235,15 @@
- msvc-19.32
- nonconcurrent
+.windows_tags_nonconcurrent_vs2022_arm64:
+ tags:
+ - cmake # Since this is a bare runner, pin to a project.
+ - windows
+ - shell
+ - vs2022
+ - msvc-19.32-arm64
+ - nonconcurrent
+
.windows_tags_concurrent_vs2022:
tags:
- cmake # Since this is a bare runner, pin to a project.
diff --git a/Tests/RunCMake/CMakeRelease/FileTable-stdout.txt b/Tests/RunCMake/CMakeRelease/FileTable-stdout.txt
index 37eb91e..2960eeb 100644
--- a/Tests/RunCMake/CMakeRelease/FileTable-stdout.txt
+++ b/Tests/RunCMake/CMakeRelease/FileTable-stdout.txt
@@ -17,6 +17,8 @@
"cmake-@version@-windows-i386\.zip"
"cmake-@version@-windows-x86_64\.msi"
"cmake-@version@-windows-x86_64\.zip"
+"cmake-@version@-windows-arm64\.msi"
+"cmake-@version@-windows-arm64\.zip"
"cmake-@version@\.tar\.gz"
"cmake-@version@\.zip"
-- query: \.files\[\] \| select\(\.os\[\] \| \. == "source"\) \| \.name
diff --git a/Utilities/Release/files-v1.json.in b/Utilities/Release/files-v1.json.in
index aa6b15d..2f860d2 100644
--- a/Utilities/Release/files-v1.json.in
+++ b/Utilities/Release/files-v1.json.in
@@ -84,6 +84,18 @@
"name": "cmake-@version@-windows-x86_64.zip"
},
{
+ "os": ["windows", "Windows"],
+ "architecture": ["arm64"],
+ "class": "installer",
+ "name": "cmake-@version@-windows-arm64.msi"
+ },
+ {
+ "os": ["windows", "Windows"],
+ "architecture": ["arm64"],
+ "class": "archive",
+ "name": "cmake-@version@-windows-arm64.zip"
+ },
+ {
"os": ["source"],
"architecture": [],
"class": "archive",
diff --git a/Utilities/Release/files-v1.rst b/Utilities/Release/files-v1.rst
index ceebecc..f0064e8 100644
--- a/Utilities/Release/files-v1.rst
+++ b/Utilities/Release/files-v1.rst
@@ -76,7 +76,7 @@ The members are:
Source packages have an empty list of architectures (``[]``).
Binary packages have a non-empty list of architectures, with at least
one name matching the output of ``uname -m`` on corresponding hosts.
- On Windows, architecture names include ``x86_64`` and ``i386``.
+ On Windows, architecture names include ``x86_64``, ``i386``, and ``arm64``.
On macOS, universal binary packages list all architectures,
e.g. ``["arm64","x86_64"]``.
diff --git a/Utilities/Release/win/qt-6.3.0-win-msvc.ps1 b/Utilities/Release/win/qt-6.3.0-win-msvc.ps1
new file mode 100755
index 0000000..265b26e
--- /dev/null
+++ b/Utilities/Release/win/qt-6.3.0-win-msvc.ps1
@@ -0,0 +1,135 @@
+# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
+# file Copyright.txt or https://cmake.org/licensing for details.
+
+# Run this script on a Windows host to generate Qt binaries.
+# Set the PATH environment variable to contain the locations of cmake and git.
+
+param (
+ [string]$cmake = 'cmake',
+ [string]$git = 'git',
+ [string]$ninja = 'ninja',
+ [switch]$trace
+)
+
+if ($trace -eq $true) {
+ Set-PSDebug -Trace 1
+}
+
+$ErrorActionPreference = 'Stop'
+$ProgressPreference = 'SilentlyContinue'
+
+if ($env:VSCMD_ARG_TGT_ARCH -eq "x64") {
+ $arch = "x86_64";
+} elseif ($env:VSCMD_ARG_TGT_ARCH -eq "x86") {
+ $arch = "i386";
+} elseif ($env:VSCMD_ARG_TGT_ARCH -eq "arm64") {
+ $arch = "arm64";
+} else {
+ Write-Host "VSCMD_ARG_TGT_ARCH env var not recognized. Run this from a Visual Studio Command Prompt."
+ exit 1
+}
+
+if ($env:VCToolsVersion -match '^(?<version>[0-9][0-9]\.[0-9])') {
+ $toolset = "msvc_v" + $Matches.version -replace '\.', ''
+} else {
+ Write-Host "VCToolsVersion env var not set. Run this from a Visual Studio Command Prompt."
+}
+
+$srcname = "qt-everywhere-src-6.3.0"
+$pkgname = "qt-6.3.0-win-$arch-$toolset-1"
+$pkgname_host = "qt-6.3.0-win-x86_64-$toolset-1"
+$topdir = $pwd.Path
+$srcdir = Join-Path $topdir $srcname
+$blddir = Join-Path $topdir "$pkgname-build"
+$prefix = Join-Path $topdir $pkgname
+$prefix_host = Join-Path $topdir "$pkgname_host"
+
+# Qt Source
+if ( -not (Test-Path -Path $srcdir)) {
+ Invoke-WebRequest -Uri "https://download.qt.io/official_releases/qt/6.3/6.3.0/single/qt-everywhere-src-6.3.0.tar.xz" -OutFile qt.tar.xz
+ if ($(Get-FileHash "qt.tar.xz").Hash -ne 'cd2789cade3e865690f3c18df58ffbff8af74cc5f01faae50634c12eb52dd85b') {
+ exit 1
+ }
+ & $cmake -E tar xvf qt.tar.xz
+ Remove-Item qt.tar.xz
+}
+
+# Build Qt
+if ( -not (Test-Path -Path $blddir)) {
+ New-Item -ItemType Directory -Path $blddir
+ Set-Location -Path "$blddir"
+ if ($arch -eq "arm64") {
+ $qt_platform = "win32-arm64-msvc"
+ $qt_host_path = "-qt-host-path", "$prefix_host"
+ } else {
+ $qt_platform = "win32-msvc"
+ $qt_host_path = $null
+ }
+ & ..\$srcname\configure.bat `
+ -prefix $prefix `
+ -static `
+ -static-runtime `
+ -release `
+ -opensource -confirm-license `
+ -platform $qt_platform `
+ $qt_host_path `
+ -gui `
+ -widgets `
+ -qt-doubleconversion `
+ -qt-freetype `
+ -qt-harfbuzz `
+ -qt-pcre `
+ -qt-zlib `
+ -qt-libpng `
+ -qt-libjpeg `
+ -no-gif `
+ -no-tiff `
+ -no-webp `
+ -no-icu `
+ -no-pch `
+ -no-opengl `
+ -no-dbus `
+ -no-accessibility `
+ -no-feature-androiddeployqt `
+ -no-feature-assistant `
+ -no-feature-designer `
+ -no-feature-linguist `
+ -no-feature-pixeltool `
+ -no-feature-printsupport `
+ -no-feature-qtattributionsscanner `
+ -no-feature-qtdiag `
+ -no-feature-qtplugininfo `
+ -no-feature-sql `
+ -no-feature-windeployqt `
+ -skip qtconnectivity `
+ -skip qtdeclarative `
+ -skip qtdoc `
+ -skip qtlottie `
+ -skip qtmqtt `
+ -skip qtmultimedia `
+ -skip qtopcua `
+ -skip qtquick3d `
+ -skip qtquicktimeline `
+ -skip qtscxml `
+ -skip qtsensors `
+ -skip qtserialport `
+ -skip qtsvg `
+ -skip qtvirtualkeyboard `
+ -skip qtwayland `
+ -skip qtwebchannel `
+ -skip qtwebengine `
+ -skip qtwebsockets `
+ -skip qtwebview `
+ -nomake examples `
+ -nomake tests
+ & $ninja
+}
+
+# Install Qt
+if ( -not (Test-Path -Path $prefix)) {
+ & $ninja install
+}
+
+# Package Qt
+Set-Location -Path $topdir
+& $cmake -E tar cf "$pkgname.zip" "--format=zip" "$pkgname"