diff options
author | Brad King <brad.king@kitware.com> | 2021-01-08 14:10:18 (GMT) |
---|---|---|
committer | Kitware Robot <kwrobot@kitware.com> | 2021-01-08 14:10:24 (GMT) |
commit | 0289224560a192615b7452da1958024c70f0673e (patch) | |
tree | 3d2afbcd91957cede50e93ecf0bd1debdb3a54ee | |
parent | b7718ab6ca88262bc7586fc56b7c0d95590fbe4f (diff) | |
parent | dbac5b69341920d3331df5e1415ef8b9a146d6d7 (diff) | |
download | CMake-0289224560a192615b7452da1958024c70f0673e.zip CMake-0289224560a192615b7452da1958024c70f0673e.tar.gz CMake-0289224560a192615b7452da1958024c70f0673e.tar.bz2 |
Merge topic 'rel-macos-modern'
dbac5b6934 gitlab-ci: add a job to upload macOS 10.10 binaries
2d4d9cd37a Merge branch 'backport-rel-macos-modern' into rel-macos-modern
6410425e5b ci: build separate macOS packages for macOS 10.13+ and macOS 10.10+
bbec5a03c8 Utilities/Release: Add script to build Qt 5.15.2 macOS universal binaries
97e238f61b Utilities/Release: Fix macOS Qt 5.9 build script umask
2c5f30b472 cmake-gui: Fix macOS styling for binaries distributed with Qt 5.10+
3679b74a69 gitlab-ci: update upload jobs to go to cmake.org
63079b97f0 cmake-gui: Fix macOS styling for binaries distributed with Qt 5.10+
Acked-by: Kitware Robot <kwrobot@kitware.com>
Merge-request: !5672
-rw-r--r-- | .gitlab-ci.yml | 23 | ||||
-rw-r--r-- | .gitlab/artifacts.yml | 2 | ||||
-rw-r--r-- | .gitlab/ci/configure_macos10.10_package.cmake | 4 | ||||
-rw-r--r-- | .gitlab/ci/configure_macos_package.cmake | 28 | ||||
-rw-r--r-- | .gitlab/ci/configure_macos_package_common.cmake | 26 | ||||
-rw-r--r-- | .gitlab/ci/download_qt.cmake | 6 | ||||
-rw-r--r-- | .gitlab/ci/download_qt_hashes.cmake | 1 | ||||
-rw-r--r-- | .gitlab/os-macos.yml | 8 | ||||
-rw-r--r-- | .gitlab/upload.yml | 2 | ||||
-rw-r--r-- | Help/release/3.19.rst | 10 | ||||
-rw-r--r-- | Source/QtDialog/CMakeLists.txt | 3 | ||||
-rwxr-xr-x | Utilities/Release/macos/qt-5.15.2-macosx10.13-x86_64-arm64.bash | 125 | ||||
-rwxr-xr-x | Utilities/Release/macos/qt-5.9.9-macosx10.10-x86_64-arm64.bash | 2 |
13 files changed, 211 insertions, 29 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 073630e..680d77b 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -284,6 +284,29 @@ upload:macos-package: variables: RSYNC_DESTINATION: dev +build:macos10.10-package: + extends: + - .macos10.10_package + - .cmake_build_macos_package + - .cmake_release_artifacts + - .macos_builder_tags_package + - .run_only_for_package + dependencies: + - prep:doc-package + needs: + - prep:doc-package + +upload:macos10.10-package: + extends: + - .rsync_upload + - .run_only_for_package + dependencies: + - build:macos10.10-package + needs: + - build:macos10.10-package + variables: + RSYNC_DESTINATION: dev + # Windows builds build:windows-vs2019-x64-ninja: diff --git a/.gitlab/artifacts.yml b/.gitlab/artifacts.yml index 76ffd27..87828e1 100644 --- a/.gitlab/artifacts.yml +++ b/.gitlab/artifacts.yml @@ -75,7 +75,7 @@ # Any packages made. - build/cmake-*-Linux-x86_64.* - build/cmake-*-Linux-aarch64.* - - build/cmake-*-macos-universal.* + - build/cmake-*-macos*-universal.* # Any source packages made. - build/cmake-*.tar.gz - build/cmake-*.zip diff --git a/.gitlab/ci/configure_macos10.10_package.cmake b/.gitlab/ci/configure_macos10.10_package.cmake new file mode 100644 index 0000000..f01e6c8 --- /dev/null +++ b/.gitlab/ci/configure_macos10.10_package.cmake @@ -0,0 +1,4 @@ +set(CPACK_SYSTEM_NAME "macos10.10-universal" CACHE STRING "") +set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10" CACHE STRING "") + +include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_package_common.cmake") diff --git a/.gitlab/ci/configure_macos_package.cmake b/.gitlab/ci/configure_macos_package.cmake index a1dbdb9..380e44c 100644 --- a/.gitlab/ci/configure_macos_package.cmake +++ b/.gitlab/ci/configure_macos_package.cmake @@ -1,28 +1,4 @@ -set(CMake_DOC_ARTIFACT_PREFIX "$ENV{CI_PROJECT_DIR}/build/install-doc" CACHE PATH "") - -# Set up install destinations as expected by the packaging scripts. -set(CMAKE_INSTALL_PREFIX "/" CACHE PATH "") -set(CMAKE_DOC_DIR "doc/cmake" CACHE STRING "") - -# Settings for CMake packages for macOS. -set(CPACK_DMG_FORMAT "UDBZ" CACHE STRING "") -set(CMAKE_CXX_FLAGS "-stdlib=libc++" CACHE STRING "") -set(CMAKE_C_STANDARD "11" CACHE STRING "") -set(CMAKE_CXX_STANDARD "14" CACHE STRING "") -set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "") -set(CMAKE_OSX_DEPLOYMENT_TARGET "10.10" CACHE STRING "") -set(CMAKE_SKIP_BOOTSTRAP_TEST "TRUE" CACHE STRING "") set(CPACK_SYSTEM_NAME "macos-universal" CACHE STRING "") -set(BUILD_CursesDialog "ON" CACHE BOOL "") -set(BUILD_QtDialog "TRUE" CACHE BOOL "") -set(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL "3" CACHE STRING "") -set(CMake_INSTALL_DEPENDENCIES "ON" CACHE BOOL "") -set(CMAKE_SKIP_RPATH "TRUE" CACHE BOOL "") -set(CMake_TEST_NO_FindPackageModeMakefileTest "TRUE" CACHE BOOL "") - -# XXX(sccache): restore sccache when it works for multiple architectures: -# https://github.com/mozilla/sccache/issues/847 -set(configure_no_sccache 1) +set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "") -include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_common.cmake") -include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_package_common.cmake") diff --git a/.gitlab/ci/configure_macos_package_common.cmake b/.gitlab/ci/configure_macos_package_common.cmake new file mode 100644 index 0000000..3aa8ae2 --- /dev/null +++ b/.gitlab/ci/configure_macos_package_common.cmake @@ -0,0 +1,26 @@ +set(CMake_DOC_ARTIFACT_PREFIX "$ENV{CI_PROJECT_DIR}/build/install-doc" CACHE PATH "") + +# Set up install destinations as expected by the packaging scripts. +set(CMAKE_INSTALL_PREFIX "/" CACHE PATH "") +set(CMAKE_DOC_DIR "doc/cmake" CACHE STRING "") + +# Settings for CMake packages for macOS. +set(CPACK_DMG_FORMAT "UDBZ" CACHE STRING "") +set(CMAKE_CXX_FLAGS "-stdlib=libc++" CACHE STRING "") +set(CMAKE_C_STANDARD "11" CACHE STRING "") +set(CMAKE_CXX_STANDARD "14" CACHE STRING "") +set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64" CACHE STRING "") +set(CMAKE_SKIP_BOOTSTRAP_TEST "TRUE" CACHE STRING "") +set(BUILD_CursesDialog "ON" CACHE BOOL "") +set(BUILD_QtDialog "TRUE" CACHE BOOL "") +set(CMake_GUI_DISTRIBUTE_WITH_Qt_LGPL "3" CACHE STRING "") +set(CMake_INSTALL_DEPENDENCIES "ON" CACHE BOOL "") +set(CMAKE_SKIP_RPATH "TRUE" CACHE BOOL "") +set(CMake_TEST_NO_FindPackageModeMakefileTest "TRUE" CACHE BOOL "") + +# XXX(sccache): restore sccache when it works for multiple architectures: +# https://github.com/mozilla/sccache/issues/847 +set(configure_no_sccache 1) + +include("${CMAKE_CURRENT_LIST_DIR}/configure_macos_common.cmake") +include("${CMAKE_CURRENT_LIST_DIR}/configure_common.cmake") diff --git a/.gitlab/ci/download_qt.cmake b/.gitlab/ci/download_qt.cmake index 4a33f12..76c693d 100644 --- a/.gitlab/ci/download_qt.cmake +++ b/.gitlab/ci/download_qt.cmake @@ -48,7 +48,11 @@ if (qt_platform STREQUAL "windows_x86") set(qt_subdir "${qt_version}/msvc${msvc_year}_64") elseif (qt_platform STREQUAL "mac_x64") - if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "package") + if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "macos_package") + list(APPEND qt_files + "qt-5.15.2-macosx10.13-x86_64-arm64.tar.xz") + set(qt_subdir "qt-5.15.2-macosx10.13-x86_64-arm64") + elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "macos10.10_package") list(APPEND qt_files "qt-5.9.9-macosx10.10-x86_64-arm64.tar.xz") set(qt_subdir "qt-5.9.9-macosx10.10-x86_64-arm64") diff --git a/.gitlab/ci/download_qt_hashes.cmake b/.gitlab/ci/download_qt_hashes.cmake index 832fa98..afbc081 100644 --- a/.gitlab/ci/download_qt_hashes.cmake +++ b/.gitlab/ci/download_qt_hashes.cmake @@ -11,3 +11,4 @@ set("5.15.1-0-202009071110qtwinextras-Windows-Windows_10-MSVC2015-Windows-Window set("5.15.1-0-202009071110qtbase-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64.7z_hash" df2813ce7c6cb4287abd7956cd1cb9d08312e4ac1208b6cb57af4df11b8ebba1) set("qt-5.9.9-macosx10.10-x86_64-arm64.tar.xz_hash" d4449771afa0bc6a809c14f1e6d939e7732494cf059503ae451e2bfe8fc60cc1) +set("qt-5.15.2-macosx10.13-x86_64-arm64.tar.xz_hash" 7b9463a01c8beeee5bf8d01c70deff2d08561cd20aaf6f7a2f41cf8b68ce8a6b) diff --git a/.gitlab/os-macos.yml b/.gitlab/os-macos.yml index 7819e3f..450bae7 100644 --- a/.gitlab/os-macos.yml +++ b/.gitlab/os-macos.yml @@ -47,6 +47,14 @@ CTEST_NO_WARNINGS_ALLOWED: 1 CMake_SKIP_INSTALL: 1 +.macos10.10_package: + extends: .macos_build + + variables: + CMAKE_CONFIGURATION: macos10.10_package + CTEST_NO_WARNINGS_ALLOWED: 1 + CMake_SKIP_INSTALL: 1 + ### External testing .macos_xcode: diff --git a/.gitlab/upload.yml b/.gitlab/upload.yml index 6bfa763..8b8daa1 100644 --- a/.gitlab/upload.yml +++ b/.gitlab/upload.yml @@ -15,4 +15,4 @@ - dnf install -y --setopt=install_weak_deps=False rsync openssh-clients - chmod 400 $RSYNC_BINARY_KEY - ssh-keygen -y -f $RSYNC_BINARY_KEY > $RSYNC_BINARY_KEY.pub - - rsync -tv --recursive -e "ssh -i $RSYNC_BINARY_KEY -o StrictHostKeyChecking=no -o LogLevel=ERROR" build/ kitware@public.kitware.com:$RSYNC_DESTINATION/ + - rsync -tv --recursive -e "ssh -i $RSYNC_BINARY_KEY -o StrictHostKeyChecking=no -o LogLevel=ERROR" build/ kitware@cmake.org:$RSYNC_DESTINATION/ diff --git a/Help/release/3.19.rst b/Help/release/3.19.rst index eb49c6f..7ad27c8 100644 --- a/Help/release/3.19.rst +++ b/Help/release/3.19.rst @@ -390,3 +390,13 @@ Changes made since CMake 3.19.0 include the following. ------ * A precompiled Linux ``aarch64`` binary is now provided on ``cmake.org``. + +* Two precompiled macOS binaries are now provided on ``cmake.org``: + + * The naming pattern ``cmake-$ver-macos-universal`` is a universal + binary with ``x86_64`` and ``arm64`` architectures. It requires + macOS 10.13 or newer. + + * The naming pattern ``cmake-$ver-macos10.10-universal`` is a universal + binary with ``x86_64`` and ``arm64`` architectures. It requires + macOS 10.10 or newer. diff --git a/Source/QtDialog/CMakeLists.txt b/Source/QtDialog/CMakeLists.txt index 9ae677b..d8f89d6 100644 --- a/Source/QtDialog/CMakeLists.txt +++ b/Source/QtDialog/CMakeLists.txt @@ -119,6 +119,9 @@ if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32)) if(APPLE) if (INSTALLED_QT_VERSION VERSION_EQUAL 5) install_qt_plugin("Qt5::QCocoaIntegrationPlugin" QT_PLUGINS) + if(TARGET Qt5::QMacStylePlugin) + install_qt_plugin("Qt5::QMacStylePlugin" QT_PLUGINS) + endif() else() # FIXME: Minimize plugins for Qt6. install_qt_plugins(QT_COMPONENTS QT_PLUGINS) diff --git a/Utilities/Release/macos/qt-5.15.2-macosx10.13-x86_64-arm64.bash b/Utilities/Release/macos/qt-5.15.2-macosx10.13-x86_64-arm64.bash new file mode 100755 index 0000000..bf92e62 --- /dev/null +++ b/Utilities/Release/macos/qt-5.15.2-macosx10.13-x86_64-arm64.bash @@ -0,0 +1,125 @@ +#!/usr/bin/env bash + +# Run this script on a macOS x86_64 host to generate Qt universal binaries. +# +# This script requires the 'makeuniversal' tool from: +# +# https://github.com/fizzyade/makeuniversal +# +# Build it with an existing local Qt installation first. +# +# Set the PATH environment variable to contain the location of 'makeuniversal'. + +set -e +set -x + +umask 022 + +# Verify that 'makeuniversal' is available in the PATH. +type -p makeuniversal >/dev/null + +# Download, verify, and extract sources. +curl -OL https://download.qt.io/archive/qt/5.15/5.15.2/single/qt-everywhere-src-5.15.2.tar.xz +shasum -a 256 qt-everywhere-src-5.15.2.tar.xz | grep -q 3a530d1b243b5dec00bc54937455471aaa3e56849d2593edb8ded07228202240 +tar xjf qt-everywhere-src-5.15.2.tar.xz + +# Build the x86_64 variant. +mkdir qt-5.15.2-x86_64 +cd qt-5.15.2-x86_64 +../qt-everywhere-src-5.15.2/configure \ + --prefix=/ \ + -platform macx-clang \ + -device-option QMAKE_APPLE_DEVICE_ARCHS=x86_64 \ + -device-option QMAKE_MACOSX_DEPLOYMENT_TARGET=10.13 \ + -release \ + -opensource -confirm-license \ + -gui \ + -widgets \ + -no-gif \ + -no-icu \ + -no-pch \ + -no-angle \ + -no-opengl \ + -no-dbus \ + -no-harfbuzz \ + -skip declarative \ + -skip multimedia \ + -skip qtcanvas3d \ + -skip qtcharts \ + -skip qtconnectivity \ + -skip qtdeclarative \ + -skip qtgamepad \ + -skip qtlocation \ + -skip qtmultimedia \ + -skip qtnetworkauth \ + -skip qtpurchasing \ + -skip qtremoteobjects \ + -skip qtscript \ + -skip qtsensors \ + -skip qtserialbus \ + -skip qtserialport \ + -skip qtsvg \ + -skip qtwebchannel \ + -skip qtwebengine \ + -skip qtwebsockets \ + -skip qtxmlpatterns \ + -nomake examples \ + -nomake tests \ + -nomake tools +make -j 8 +cd .. + +# Build the arm64 variant. +mkdir qt-5.15.2-arm64 +cd qt-5.15.2-arm64 +../qt-everywhere-src-5.15.2/configure \ + --prefix=/ \ + -platform macx-clang \ + -device-option QMAKE_APPLE_DEVICE_ARCHS=arm64 \ + -device-option QMAKE_MACOSX_DEPLOYMENT_TARGET=10.13 \ + -release \ + -opensource -confirm-license \ + -gui \ + -widgets \ + -no-gif \ + -no-icu \ + -no-pch \ + -no-angle \ + -no-opengl \ + -no-dbus \ + -no-harfbuzz \ + -skip declarative \ + -skip multimedia \ + -skip qtcanvas3d \ + -skip qtcharts \ + -skip qtconnectivity \ + -skip qtdeclarative \ + -skip qtgamepad \ + -skip qtlocation \ + -skip qtmultimedia \ + -skip qtnetworkauth \ + -skip qtpurchasing \ + -skip qtremoteobjects \ + -skip qtscript \ + -skip qtsensors \ + -skip qtserialbus \ + -skip qtserialport \ + -skip qtsvg \ + -skip qtwebchannel \ + -skip qtwebengine \ + -skip qtwebsockets \ + -skip qtxmlpatterns \ + -nomake examples \ + -nomake tests \ + -nomake tools +make -j 8 -k +cd .. + +# Combine the two builds into universal binaries. +makeuniversal qt-5.15.2-univ qt-5.15.2-x86_64 qt-5.15.2-arm64 +cd qt-5.15.2-univ +make install -j 8 INSTALL_ROOT=/tmp/qt-5.15.2-macosx10.13-x86_64-arm64 +cd .. + +# Create the final tarball containing universal binaries. +tar cjf qt-5.15.2-macosx10.13-x86_64-arm64.tar.xz -C /tmp qt-5.15.2-macosx10.13-x86_64-arm64 diff --git a/Utilities/Release/macos/qt-5.9.9-macosx10.10-x86_64-arm64.bash b/Utilities/Release/macos/qt-5.9.9-macosx10.10-x86_64-arm64.bash index a61e114..79931ec 100755 --- a/Utilities/Release/macos/qt-5.9.9-macosx10.10-x86_64-arm64.bash +++ b/Utilities/Release/macos/qt-5.9.9-macosx10.10-x86_64-arm64.bash @@ -13,6 +13,8 @@ set -e set -x +umask 022 + # Verify that 'makeuniversal' is available in the PATH. type -p makeuniversal >/dev/null |