diff options
author | Brad King <brad.king@kitware.com> | 2021-02-19 18:39:04 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2021-02-23 14:33:28 (GMT) |
commit | 8dcbe5688acc6bd99d049425000a5fef369d553f (patch) | |
tree | 8915b07dffdc91d7c2ec90d9712f6ec6f6e7634c | |
parent | c2c31ae8969686f1909fe76fef43a232332c7b54 (diff) | |
download | CMake-8dcbe5688acc6bd99d049425000a5fef369d553f.zip CMake-8dcbe5688acc6bd99d049425000a5fef369d553f.tar.gz CMake-8dcbe5688acc6bd99d049425000a5fef369d553f.tar.bz2 |
ci: Use Qt macOS 10.13+ package for macOS build and test jobs
It is a universal binary for both `x86_64` and `arm64` architectures.
-rw-r--r-- | .gitlab/ci/download_qt.cmake | 82 |
1 files changed, 30 insertions, 52 deletions
diff --git a/.gitlab/ci/download_qt.cmake b/.gitlab/ci/download_qt.cmake index 76c693d..3990430 100644 --- a/.gitlab/ci/download_qt.cmake +++ b/.gitlab/ci/download_qt.cmake @@ -4,31 +4,6 @@ cmake_minimum_required(VERSION 3.12) set(qt_version_major "5") set(qt_version_minor "15") set(qt_version_patch "1") -# This URL is only visible inside of Kitware's network. Please use your own Qt -# Account to obtain these files. -if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "package") - set(qt_url_root "https://cmake.org/files/dependencies") -else () - set(qt_url_root "https://paraview.org/files/dependencies/internal/qt") -endif () - -# Determine the ABI to fetch for Qt. -if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2015") - set(qt_platform "windows_x86") - set(msvc_year "2015") - set(qt_abi "win64_msvc${msvc_year}_64") -elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2017" OR - "$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2019") - set(qt_platform "windows_x86") - set(msvc_year "2019") - set(qt_abi "win64_msvc${msvc_year}_64") -elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "macos") - set(qt_platform "mac_x64") - set(qt_abi "clang_64") -else () - message(FATAL_ERROR - "Unknown ABI to use for Qt") -endif () # Combined version variables. set(qt_version "${qt_version_major}.${qt_version_minor}.${qt_version_patch}") @@ -36,7 +11,21 @@ set(qt_version_nodot "${qt_version_major}${qt_version_minor}${qt_version_patch}" # Files needed to download. set(qt_files) -if (qt_platform STREQUAL "windows_x86") +if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows") + # Determine the ABI to fetch for Qt. + if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2015") + set(qt_platform "windows_x86") + set(msvc_year "2015") + set(qt_abi "win64_msvc${msvc_year}_64") + elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2017" OR + "$ENV{CMAKE_CONFIGURATION}" MATCHES "vs2019") + set(qt_platform "windows_x86") + set(msvc_year "2019") + set(qt_abi "win64_msvc${msvc_year}_64") + else () + message(FATAL_ERROR "Unknown ABI to use for Qt") + endif () + set(qt_build_stamp "202009071110") set(qt_file_name_prefix "${qt_version}-0-${qt_build_stamp}") @@ -47,29 +36,23 @@ if (qt_platform STREQUAL "windows_x86") endforeach () set(qt_subdir "${qt_version}/msvc${msvc_year}_64") -elseif (qt_platform STREQUAL "mac_x64") - 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") + + # This URL is only visible inside of Kitware's network. + # Please use your own Qt Account to obtain these files. + set(qt_url_root "https://paraview.org/files/dependencies/internal/qt") + set(qt_url_path "${qt_platform}/desktop/qt5_${qt_version_nodot}/qt.qt5.${qt_version_nodot}.${qt_abi}") +elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "macos") + if ("$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") else () - set(qt_build_stamp "202009071110") - set(qt_file_name_prefix "${qt_version}-0-${qt_build_stamp}") - - foreach (qt_component IN ITEMS qtbase) - list(APPEND qt_files - "${qt_file_name_prefix}${qt_component}-MacOS-MacOS_10_13-Clang-MacOS-MacOS_10_13-X86_64.7z") - endforeach () - - set(qt_subdir "${qt_version}/clang_64") - endif () -else () - message(FATAL_ERROR - "Unknown files for ${qt_platform}") + 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") + endif() + set(qt_url_root "https://cmake.org/files/dependencies") + set(qt_url_path "") +else() + message(FATAL_ERROR "Unknown OS to use for Qt") endif () # Verify that we know what directory will be extracted. @@ -79,11 +62,6 @@ if (NOT qt_subdir) endif () # Build up the path to the file to download. -if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "package") - set(qt_url_path "") -else () - set(qt_url_path "${qt_platform}/desktop/qt5_${qt_version_nodot}/qt.qt5.${qt_version_nodot}.${qt_abi}") -endif () set(qt_url_prefix "${qt_url_root}/${qt_url_path}") # Include the file containing the hashes of the files that matter. |