mirror of
https://github.com/Kitware/CMake.git
synced 2026-01-08 14:50:10 -06:00
ci: Update to Qt 6.9.3 on macOS
Get Qt updates fix `cmake-gui` button rendering when compiled with a macOS 26 SDK. Issue: #27325
This commit is contained in:
1
.gitlab/.gitignore
vendored
1
.gitlab/.gitignore
vendored
@@ -1,5 +1,6 @@
|
||||
# Ignore files known to be downloaded by CI jobs.
|
||||
/5.15.1-0-202009071110*
|
||||
/6.9.3-0-202509261207*
|
||||
/appimagetool
|
||||
/bcc*
|
||||
/cmake*
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
set(CPACK_SYSTEM_NAME "macos-universal" CACHE STRING "")
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "10.13" CACHE STRING "")
|
||||
set(CMake_GUI_OSX_DEPLOYMENT_TARGET "12" CACHE STRING "")
|
||||
set(CMAKE_C_STANDARD "11" CACHE STRING "")
|
||||
set(CMAKE_CXX_STANDARD "17" CACHE STRING "")
|
||||
|
||||
|
||||
@@ -11,7 +11,6 @@ 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_BOOTSTRAP OFF CACHE BOOL "")
|
||||
set(CMake_TEST_NO_FindPackageModeMakefileTest "TRUE" CACHE BOOL "")
|
||||
|
||||
|
||||
@@ -41,6 +41,13 @@ if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "_valgrind")
|
||||
)
|
||||
endif()
|
||||
|
||||
if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "_xcode")
|
||||
list(APPEND test_exclusions
|
||||
# FIXME(#27358): Qt6Autogen.RerunMocOnAddFile fails in Xcode.
|
||||
"^Qt6Autogen.RerunMocOnAddFile$"
|
||||
)
|
||||
endif()
|
||||
|
||||
string(REPLACE ";" "|" test_exclusions "${test_exclusions}")
|
||||
if (test_exclusions)
|
||||
set(test_exclusions "(${test_exclusions})")
|
||||
|
||||
@@ -9,6 +9,8 @@ set(qt_version_patch "1")
|
||||
set(qt_version "${qt_version_major}.${qt_version_minor}.${qt_version_patch}")
|
||||
set(qt_version_nodot "${qt_version_major}${qt_version_minor}${qt_version_patch}")
|
||||
|
||||
set(qt_tar_workdir ".gitlab")
|
||||
|
||||
# Files needed to download.
|
||||
set(qt_files)
|
||||
if ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows.*package")
|
||||
@@ -61,14 +63,19 @@ elseif ("$ENV{CMAKE_CONFIGURATION}" MATCHES "windows")
|
||||
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")
|
||||
set(qt_url_root "https://cmake.org/files/dependencies")
|
||||
set(qt_url_path "")
|
||||
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 ()
|
||||
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")
|
||||
# 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://www.paraview.org/files/dependencies/internal/qt")
|
||||
set(qt_url_path "mac_x64/desktop/qt6_693/qt6_693/qt.qt6.693.clang_64")
|
||||
list(APPEND qt_files "6.9.3-0-202509261207qtbase-MacOS-MacOS_15-Clang-MacOS-MacOS_15-X86_64-ARM64.7z")
|
||||
set(qt_subdir "qt-extract")
|
||||
set(qt_tar_workdir ".gitlab/${qt_subdir}")
|
||||
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 ()
|
||||
@@ -109,12 +116,13 @@ foreach (qt_file IN LISTS qt_files)
|
||||
endif ()
|
||||
|
||||
# Extract the file.
|
||||
file(MAKE_DIRECTORY "${qt_tar_workdir}")
|
||||
execute_process(
|
||||
COMMAND
|
||||
"${CMAKE_COMMAND}"
|
||||
-E tar
|
||||
xf "${qt_file}"
|
||||
WORKING_DIRECTORY ".gitlab"
|
||||
xf "${CMAKE_CURRENT_SOURCE_DIR}/.gitlab/${qt_file}"
|
||||
WORKING_DIRECTORY "${qt_tar_workdir}"
|
||||
RESULT_VARIABLE res
|
||||
ERROR_VARIABLE err
|
||||
ERROR_STRIP_TRAILING_WHITESPACE)
|
||||
|
||||
@@ -11,7 +11,7 @@ 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)
|
||||
set("6.9.3-0-202509261207qtbase-MacOS-MacOS_15-Clang-MacOS-MacOS_15-X86_64-ARM64.7z_hash" 805144e619b7c7b0e9c985d929e1f290241d88b884218db3ad7d56bd579d6b4a)
|
||||
|
||||
set("qt-5.15.10-win-i386-msvc_v142-1.zip_hash" c158cebc054d3f4f09733772a8a04789e2884912d45782e8c0c5e6a0b2773e92)
|
||||
set("qt-5.15.10-win-x86_64-msvc_v142-1.zip_hash" d55c017aef359f6aa8c592b18ba13cc120c749417b55671548970690126cd139)
|
||||
|
||||
6
Help/release/dev/ci-macos-qt.rst
Normal file
6
Help/release/dev/ci-macos-qt.rst
Normal file
@@ -0,0 +1,6 @@
|
||||
ci-macos-qt
|
||||
-----------
|
||||
|
||||
* The precompiled macOS binary provided on ``cmake.org`` for macOS 10.13+
|
||||
now requires macOS 12 or newer for the :manual:`cmake-gui(1)` application.
|
||||
The command-line tools still run on macOS 10.13.
|
||||
@@ -1,6 +1,10 @@
|
||||
# Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
||||
# file LICENSE.rst or https://cmake.org/licensing for details.
|
||||
|
||||
if(CMake_GUI_OSX_DEPLOYMENT_TARGET)
|
||||
set(CMAKE_OSX_DEPLOYMENT_TARGET "${CMake_GUI_OSX_DEPLOYMENT_TARGET}")
|
||||
endif()
|
||||
|
||||
project(QtDialog)
|
||||
CMake_OPTIONAL_COMPONENT(cmake-gui)
|
||||
set(QT_COMPONENTS
|
||||
@@ -69,7 +73,7 @@ if(CMake_QT_STATIC_QWindowsIntegrationPlugin_LIBRARIES)
|
||||
endif()
|
||||
|
||||
# We need to install platform plugin and add qt.conf for Qt5 on Mac and Windows.
|
||||
if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
|
||||
if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32) AND NOT COMMAND qt_generate_deploy_app_script)
|
||||
function(_qt_get_plugin_name_with_version target out_var)
|
||||
string(REGEX REPLACE "^Qt::(.+)" "Qt${CMake_QT_MAJOR_VERSION}::\\1"
|
||||
qt_plugin_with_version "${target}")
|
||||
@@ -332,23 +336,33 @@ if(APPLE)
|
||||
endif()
|
||||
|
||||
if(CMake_INSTALL_DEPENDENCIES AND (APPLE OR WIN32))
|
||||
# install rules for including 3rd party libs such as Qt
|
||||
# if a system Qt is used (e.g. installed in /usr/lib/), it will not be included in the installation
|
||||
set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMake_INSTALL_BIN_DIR}/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
if(APPLE)
|
||||
set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMake_INSTALL_APP_DIR_SLASH}MacOS/CMake")
|
||||
endif()
|
||||
get_property(_Qt_Core_LOCATION TARGET Qt${CMake_QT_MAJOR_VERSION}::Core PROPERTY LOCATION)
|
||||
if(APPLE AND _Qt_Core_LOCATION MATCHES [[^(.*)/[^/]*\.framework/]])
|
||||
set(Qt_LIB_DIR "${CMAKE_MATCH_1}")
|
||||
if(COMMAND qt_generate_deploy_app_script)
|
||||
# Qt libraries are found via @rpath, so point the runtime path at them.
|
||||
set_property(TARGET cmake-gui PROPERTY INSTALL_RPATH "@executable_path/../Frameworks")
|
||||
qt_generate_deploy_app_script(
|
||||
TARGET cmake-gui
|
||||
OUTPUT_SCRIPT qt_deploy_script
|
||||
)
|
||||
install(SCRIPT "${qt_deploy_script}")
|
||||
else()
|
||||
get_filename_component(Qt_LIB_DIR "${_Qt_Core_LOCATION}" PATH)
|
||||
# install rules for including 3rd party libs such as Qt
|
||||
# if a system Qt is used (e.g. installed in /usr/lib/), it will not be included in the installation
|
||||
set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMake_INSTALL_BIN_DIR}/cmake-gui${CMAKE_EXECUTABLE_SUFFIX}")
|
||||
if(APPLE)
|
||||
set(fixup_exe "\$ENV{DESTDIR}\${CMAKE_INSTALL_PREFIX}/${CMake_INSTALL_APP_DIR_SLASH}MacOS/CMake")
|
||||
endif()
|
||||
get_property(_Qt_Core_LOCATION TARGET Qt${CMake_QT_MAJOR_VERSION}::Core PROPERTY LOCATION)
|
||||
if(APPLE AND _Qt_Core_LOCATION MATCHES [[^(.*)/[^/]*\.framework/]])
|
||||
set(Qt_LIB_DIR "${CMAKE_MATCH_1}")
|
||||
else()
|
||||
get_filename_component(Qt_LIB_DIR "${_Qt_Core_LOCATION}" PATH)
|
||||
endif()
|
||||
install(CODE "
|
||||
include(BundleUtilities)
|
||||
set(BU_CHMOD_BUNDLE_ITEMS ON)
|
||||
fixup_bundle(\"${fixup_exe}\" \"${QT_PLUGINS}\" \"${Qt_LIB_DIR};${QT_LIBRARY_DIR};${QT_BINARY_DIR}\")
|
||||
" ${COMPONENT})
|
||||
endif()
|
||||
install(CODE "
|
||||
include(BundleUtilities)
|
||||
set(BU_CHMOD_BUNDLE_ITEMS ON)
|
||||
fixup_bundle(\"${fixup_exe}\" \"${QT_PLUGINS}\" \"${Qt_LIB_DIR};${QT_LIBRARY_DIR};${QT_BINARY_DIR}\")
|
||||
" ${COMPONENT})
|
||||
endif()
|
||||
|
||||
set(CMAKE_PACKAGE_QTGUI TRUE)
|
||||
|
||||
Reference in New Issue
Block a user