Added auto-applied cmake submodule patches for Qt 6.11 compatibility.
Esse commit está contido em:
@@ -53,6 +53,7 @@ stage
|
||||
*.*~
|
||||
.idea/
|
||||
cmake-build-debug/
|
||||
*.qsb
|
||||
|
||||
# Local configuration files
|
||||
settings.local.json
|
||||
|
||||
@@ -8,6 +8,29 @@ cmake_minimum_required(VERSION 3.25...3.31)
|
||||
|
||||
set_property(GLOBAL PROPERTY USE_FOLDERS ON)
|
||||
|
||||
# Apply qt6.11 patches to submodules at configure time.
|
||||
file(GLOB _submodule_patches "${CMAKE_SOURCE_DIR}/patches/*.patch")
|
||||
foreach(_patch ${_submodule_patches})
|
||||
get_filename_component(_patch_name ${_patch} NAME)
|
||||
# Extract target submodule directory from patch filename (prefix before first '_').
|
||||
string(REGEX MATCH "^([a-z]+)" _submodule ${_patch_name})
|
||||
if (IS_DIRECTORY "${CMAKE_SOURCE_DIR}/${_submodule}")
|
||||
execute_process(
|
||||
COMMAND git apply --check ${_patch}
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/${_submodule}"
|
||||
RESULT_VARIABLE _check_result
|
||||
OUTPUT_QUIET ERROR_QUIET
|
||||
)
|
||||
if (_check_result EQUAL 0)
|
||||
execute_process(
|
||||
COMMAND git apply ${_patch}
|
||||
WORKING_DIRECTORY "${CMAKE_SOURCE_DIR}/${_submodule}"
|
||||
)
|
||||
message(STATUS "Applied patch: ${_patch_name}")
|
||||
endif()
|
||||
endif()
|
||||
endforeach()
|
||||
|
||||
include(cmake/validate_special_target.cmake)
|
||||
include(cmake/version.cmake)
|
||||
desktop_app_parse_version(Telegram/build/version)
|
||||
|
||||
@@ -1554,6 +1554,10 @@ win:
|
||||
jom -j%NUMBER_OF_PROCESSORS% install
|
||||
mac:
|
||||
find ../../patches/qtbase_$QT -type f -print0 | sort -z | xargs -0 git apply
|
||||
QT_MAJOR_MINOR=$(echo $QT | grep -oE '^[0-9]+\\.[0-9]+')
|
||||
if [ -d "../../patches/qt6_highsierra/$QT_MAJOR_MINOR" ]; then
|
||||
find "../../patches/qt6_highsierra/$QT_MAJOR_MINOR" -type f -print0 | sort -z | xargs -0 git apply
|
||||
fi
|
||||
cd ..
|
||||
|
||||
CONFIGURATIONS=-debug
|
||||
@@ -1588,6 +1592,10 @@ else: # qt > '6'
|
||||
depends:patches/qtbase_""" + qt + """/*.patch
|
||||
cd qtbase
|
||||
mac:
|
||||
QT_MAJOR_MINOR=$(echo $QT | grep -oE '^[0-9]+\\.[0-9]+')
|
||||
if [ -d "../../patches/qt6_highsierra/$QT_MAJOR_MINOR" ]; then
|
||||
find "../../patches/qt6_highsierra/$QT_MAJOR_MINOR" -type f -print0 | sort -z | xargs -0 git apply -v
|
||||
fi
|
||||
find ../../patches/qtbase_$QT -type f -print0 | sort -z | xargs -0 git apply -v
|
||||
cd ..
|
||||
sed -i.bak 's/tqtc-//' {qtimageformats,qtsvg}/dependencies.yaml
|
||||
@@ -1602,6 +1610,7 @@ mac:
|
||||
-opensource \
|
||||
-confirm-license \
|
||||
-static \
|
||||
-no-framework \
|
||||
-opengl desktop \
|
||||
-no-openssl \
|
||||
-securetransport \
|
||||
@@ -1611,7 +1620,8 @@ mac:
|
||||
-no-feature-brotli \
|
||||
-platform macx-clang -- \
|
||||
-DCMAKE_OSX_ARCHITECTURES="x86_64;arm64" \
|
||||
-DCMAKE_PREFIX_PATH="$USED_PREFIX"
|
||||
-DCMAKE_PREFIX_PATH="$USED_PREFIX" \
|
||||
-DQT_SYNC_HEADERS_AT_CONFIGURE_TIME=ON
|
||||
|
||||
cmake --build .
|
||||
cmake --install .
|
||||
|
||||
@@ -2,7 +2,7 @@ import sys, os
|
||||
|
||||
def resolve(arch):
|
||||
if sys.platform == 'darwin':
|
||||
os.environ['QT'] = '6.2.13'
|
||||
os.environ['QT'] = '6.11.0'
|
||||
elif sys.platform == 'win32':
|
||||
if arch == 'arm' or 'qt6' in sys.argv:
|
||||
print('Choosing Qt 6.')
|
||||
|
||||
+1
-1
Submodule cmake updated: 66f6a0318c...4088db229d
@@ -0,0 +1,69 @@
|
||||
From 982e3ecbcf9a874bd5f82433f514f3175a84eeb1 Mon Sep 17 00:00:00 2001
|
||||
From: 23rd <23rd@vivaldi.net>
|
||||
Date: Wed, 1 Apr 2026 09:06:36 +0300
|
||||
Subject: [PATCH] 1
|
||||
|
||||
---
|
||||
external/qt/CMakeLists.txt | 22 ++++++++++++++++++++--
|
||||
options_mac.cmake | 11 +++++++++++
|
||||
2 files changed, 31 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/external/qt/CMakeLists.txt b/external/qt/CMakeLists.txt
|
||||
index 577b67b..9845f55 100644
|
||||
--- a/external/qt/CMakeLists.txt
|
||||
+++ b/external/qt/CMakeLists.txt
|
||||
@@ -234,12 +234,30 @@ elseif (APPLE)
|
||||
lib/${qt_lib_prefix}Qt${QT_VERSION_MAJOR}BundledFreetype
|
||||
plugins/platforms/${qt_lib_prefix}qcocoa
|
||||
plugins/tls/${qt_lib_prefix}qsecuretransportbackend
|
||||
- plugins/networkinformation/${qt_lib_prefix}qscnetworkreachability
|
||||
)
|
||||
+ if (QT_VERSION VERSION_GREATER_EQUAL "6.11")
|
||||
+ list(APPEND qt_libs
|
||||
+ plugins/networkinformation/${qt_lib_prefix}qapplenetworkinformation
|
||||
+ )
|
||||
+ else()
|
||||
+ list(APPEND qt_libs
|
||||
+ plugins/networkinformation/${qt_lib_prefix}qscnetworkreachability
|
||||
+ )
|
||||
+ endif()
|
||||
list(APPEND qt_libs_list
|
||||
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QCocoaIntegrationPlugin_init>
|
||||
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QSecureTransportBackendPlugin_init>
|
||||
- $<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QSCNetworkReachabilityNetworkInformationPlugin_init>
|
||||
+ )
|
||||
+ if (QT_VERSION VERSION_GREATER_EQUAL "6.11")
|
||||
+ list(APPEND qt_libs_list
|
||||
+ $<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QAppleNetworkInformationPlugin_init>
|
||||
+ )
|
||||
+ else()
|
||||
+ list(APPEND qt_libs_list
|
||||
+ $<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QSCNetworkReachabilityNetworkInformationPlugin_init>
|
||||
+ )
|
||||
+ endif()
|
||||
+ list(APPEND qt_libs_list
|
||||
$<TARGET_OBJECTS:Qt${QT_VERSION_MAJOR}::QCocoaIntegrationPlugin_resources_1>
|
||||
)
|
||||
foreach (lib ${qt_libs})
|
||||
diff --git a/options_mac.cmake b/options_mac.cmake
|
||||
index 59494d8..73960ad 100644
|
||||
--- a/options_mac.cmake
|
||||
+++ b/options_mac.cmake
|
||||
@@ -80,3 +80,14 @@ INTERFACE
|
||||
LocalAuthentication
|
||||
Vision
|
||||
)
|
||||
+
|
||||
+target_link_frameworks_weak(common_options
|
||||
+INTERFACE
|
||||
+ Network
|
||||
+ UniformTypeIdentifiers
|
||||
+)
|
||||
+
|
||||
+target_link_libraries(common_options
|
||||
+INTERFACE
|
||||
+ resolv
|
||||
+)
|
||||
--
|
||||
2.50.1 (Apple Git-155)
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário