summaryrefslogtreecommitdiffstats
path: root/.gitlab/ci/configure_windows_arm64_package.cmake
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2022-06-13 16:46:28 (GMT)
committerBrad King <brad.king@kitware.com>2022-06-13 19:04:24 (GMT)
commit7a21173b0eda59959b12d2e878e54f0b90d68b1d (patch)
tree1a2db1b3dae1b05ae8f562d8db039881599008a3 /.gitlab/ci/configure_windows_arm64_package.cmake
parent06c6e76a126d357ce02b6736e4ded9e6fd9aa3ed (diff)
downloadCMake-7a21173b0eda59959b12d2e878e54f0b90d68b1d.zip
CMake-7a21173b0eda59959b12d2e878e54f0b90d68b1d.tar.gz
CMake-7a21173b0eda59959b12d2e878e54f0b90d68b1d.tar.bz2
gitlab-ci: Add job to build Windows arm64 binaries
Base it on the approach from commit 4c7c66dcf5 (gitlab-ci: Add jobs to make Windows x86_64 and i386 packages, 2022-05-19). Leave out the packaging and upload steps for now because they are only for the nightly binaries, and will need a new release of CPack to pass the `arm64` architecture to WiX. Issue: #21902
Diffstat (limited to '.gitlab/ci/configure_windows_arm64_package.cmake')
-rw-r--r--.gitlab/ci/configure_windows_arm64_package.cmake16
1 files changed, 16 insertions, 0 deletions
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")