From 8998563677e3f308083ba1c4c28efd6fe3d850f7 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Tue, 25 Jan 2022 08:44:55 +0100 Subject: Add QtPdf iOS builds QtPDf iOS builds must support fat libs builds. Compared to 5.15 however this is done differently. Before we tweaked gn to compile multi arch with 'Xarch' parameter. This had few downsides as we could not determine which arch/cpu compiles given file as compilation was opaque to gn. The current approach is to follow mac universal builds, compile builds separately for each architecture and lipo the outcome. However, this introduces some issues as ios builds are static builds and creating lipo archive will gather object files, which should end up in final QtPdf lib instead. Therefore create multi arch object file instead of archive and use this one. Note the compiler now uses arch triple for Pdfium as Chromium does, however qt files still use 'arch' and '*-version-min' combination. Task-number: QTBUG-88614 Pick-to: 6.3 6.2 Change-Id: I7775c8b4d1554df497eb61fa6187f12c00b9032d Reviewed-by: Peter Varga --- configure.cmake | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'configure.cmake') diff --git a/configure.cmake b/configure.cmake index 397f51f70..86428d880 100644 --- a/configure.cmake +++ b/configure.cmake @@ -371,10 +371,15 @@ assertTargets( TARGETS Gui Quick Qml ) add_check_for_support( - MODULES QtWebEngine QtPdf + MODULES QtWebEngine CONDITION LINUX OR (WIN32 AND NOT WIN_ARM_64) OR (MACOS AND NOT CMAKE_CROSSCOMPILING) MESSAGE "Build can be done only on Linux, Windows or macOS." ) +add_check_for_support( + MODULES QtPdf + CONDITION LINUX OR (WIN32 AND NOT WIN_ARM_64) OR (MACOS AND NOT CMAKE_CROSSCOMPILING) OR IOS + MESSAGE "Build can be done only on Linux, Windows, macOS or iOS." +) if(LINUX AND CMAKE_CROSSCOMPILING) get_gn_arch(testArch ${TEST_architecture_arch}) add_check_for_support( @@ -384,7 +389,7 @@ if(LINUX AND CMAKE_CROSSCOMPILING) ) endif() add_check_for_support( - MODULES QtWebEngine QtPdf + MODULES QtWebEngine CONDITION NOT QT_FEATURE_static MESSAGE "Static build is not supported." ) @@ -476,7 +481,8 @@ add_check_for_support( (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL MSVC) OR (WIN32 AND CMAKE_CXX_COMPILER_ID STREQUAL Clang AND CMAKE_CXX_SIMULATE_ID STREQUAL MSVC) OR - (MACOS AND CMAKE_CXX_COMPILER_ID STREQUAL AppleClang) + (MACOS AND CMAKE_CXX_COMPILER_ID STREQUAL AppleClang) OR + (APPLE AND CMAKE_CXX_COMPILER_ID STREQUAL AppleClang) MESSAGE "${CMAKE_CXX_COMPILER_ID} compiler is not supported." ) -- cgit v1.2.1