summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@qt.io>2021-07-20 12:34:39 +0200
committerAllan Sandfeld Jensen <allan.jensen@qt.io>2021-07-23 16:32:42 +0200
commitd39f8065a23aade87a83357adf8b02cdde79f4b1 (patch)
treec0536712ea119b75a526cebed5316a72b35591db
parent132681d3a3081c1fbf2ce1b39dca4a0ee6516f25 (diff)
Add support for macOS universal builds
Change-Id: I416036a925167204cf5121108922911bce854352 Reviewed-by: Michal Klocek <michal.klocek@qt.io> (cherry picked from commit 35144cbc3a285029574ea3ef45e4a6790f9607e4)
-rw-r--r--cmake/Functions.cmake127
-rw-r--r--configure.cmake10
m---------src/3rdparty0
-rw-r--r--src/core/CMakeLists.txt831
4 files changed, 554 insertions, 414 deletions
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake
index 3f01646ed..94d2949cf 100644
--- a/cmake/Functions.cmake
+++ b/cmake/Functions.cmake
@@ -341,6 +341,119 @@ function(extend_target_with_gn_objects target config cmakeFile stampFile)
endif()
endfunction()
+function(extend_target_with_gn_libs target config cmakeFile stampFile)
+ string(TOUPPER ${config} cfg)
+
+ # Do a partial link of all the archives into a single archive:
+ include(${buildDir}/arm64/${config}/${cmakeFile})
+ set_source_files_properties(${${cfg}_NINJA_OBJECTS} PROPERTIES GENERATED TRUE)
+
+ list(JOIN ${cfg}_NINJA_OBJECTS " " arm64_objects)
+ list(JOIN ${cfg}_NINJA_ARCHIVES " " arm64_archives)
+ file(WRITE ${buildDir}/arm64/${config}/${target}_gnobjects.rsp ${arm64_objects})
+ file(WRITE ${buildDir}/arm64/${config}/${target}_gnarchives.rsp ${arm64_archives})
+ add_custom_command(OUTPUT ${buildDir}/arm64/${config}/${target}_gnobjects.rsp
+ ${buildDir}/arm64/${config}/${target}_gnarchives.rsp
+ DEPENDS ${buildDir}/arm64/${config}/${stampFile})
+ add_custom_target(generate_arm64_rsp_${target}_${config}
+ DEPENDS
+ ${buildDir}/arm64/${config}/${target}_gnobjects.rsp
+ ${buildDir}/arm64/${config}/${target}_gnarchives.rsp)
+
+ add_custom_command(
+ OUTPUT ${buildDir}/${config}/arm64_${target}_${config}.a
+ BYPRODUCTS ${buildDir}/${config}/arm64_${target}_${config}.o
+ COMMAND clang++ -r -nostdlib -arch arm64
+ -o ${buildDir}/${config}/arm64_${target}_${config}.o
+ -Wl,-keep_private_externs
+ @${buildDir}/arm64/${config}/${target}_gnobjects.rsp
+ -Wl,-all_load
+ @${buildDir}/arm64/${config}/${target}_gnarchives.rsp
+ COMMAND ar -cr
+ ${buildDir}/${config}/arm64_${target}_${config}.a
+ ${buildDir}/${config}/arm64_${target}_${config}.o
+ DEPENDS
+ ${buildDir}/arm64/${config}/${stampFile}
+ ${buildDir}/arm64/${config}/${target}_gnobjects.rsp
+ ${buildDir}/arm64/${config}/${target}_gnarchives.rsp
+ USES_TERMINAL
+ VERBATIM
+ COMMAND_EXPAND_LISTS
+ )
+ add_custom_command(OUTPUT ${${cfg}_NINJA_OBJECTS} ${${cfg}_NINJA_ARCHIVES}
+ DEPENDS ${buildDir}/arm64/${config}/${stampFile})
+ add_custom_target(generate_arm64_${target}_${config}
+ DEPENDS ${${cfg}_NINJA_OBJECTS} ${${cfg}_NINJA_ARCHIVES})
+
+ include(${buildDir}/x86_64/${config}/${cmakeFile})
+ set_source_files_properties(${${cfg}_NINJA_OBJECTS} PROPERTIES GENERATED TRUE)
+
+ list(JOIN ${cfg}_NINJA_OBJECTS " " x64_objects)
+ list(JOIN ${cfg}_NINJA_ARCHIVES " " x64_archives)
+ file(WRITE ${buildDir}/x86_64/${config}/${target}_gnobjects.rsp ${x64_objects})
+ file(WRITE ${buildDir}/x86_64/${config}/${target}_gnarchives.rsp ${x64_archives})
+ add_custom_command(OUTPUT ${buildDir}/x86_64/${config}/${target}_gnobjects.rsp
+ ${buildDir}/x86_64/${config}/${target}_gnarchives.rsp
+ DEPENDS ${buildDir}/x86_64/${config}/${stampFile})
+ add_custom_target(generate_x64_rsp_${target}_${config}
+ DEPENDS
+ ${buildDir}/x86_64/${config}/${target}_gnobjects.rsp
+ ${buildDir}/x86_64/${config}/${target}_gnarchives.rsp)
+
+ add_custom_command(
+ OUTPUT ${buildDir}/${config}/x64_${target}_${config}.a
+ BYPRODUCTS ${buildDir}/${config}/x64_${target}_${config}.o
+ COMMAND clang++ -r -nostdlib -arch x86_64
+ -o ${buildDir}/${config}/x64_${target}_${config}.o
+ -Wl,-keep_private_externs
+ @${buildDir}/x86_64/${config}/${target}_gnobjects.rsp
+ -Wl,-all_load
+ @${buildDir}/x86_64/${config}/${target}_gnarchives.rsp
+ COMMAND ar -cr
+ ${buildDir}/${config}/x64_${target}_${config}.a
+ ${buildDir}/${config}/x64_${target}_${config}.o
+ DEPENDS
+ ${buildDir}/x86_64/${config}/${stampFile}
+ ${buildDir}/x86_64/${config}/${target}_gnobjects.rsp
+ ${buildDir}/x86_64/${config}/${target}_gnarchives.rsp
+ USES_TERMINAL
+ VERBATIM
+ COMMAND_EXPAND_LISTS
+ )
+ add_custom_command(OUTPUT ${${cfg}_NINJA_OBJECTS} ${${cfg}_NINJA_ARCHIVES}
+ DEPENDS ${buildDir}/x86_64/${config}/${stampFile})
+ add_custom_target(generate_x86_64_${target}_${config}
+ DEPENDS ${${cfg}_NINJA_OBJECTS} ${${cfg}_NINJA_ARCHIVES})
+
+ add_custom_target(generate1_${target}_${config}
+ DEPENDS ${buildDir}/${config}/arm64_${target}_${config}.a
+ ${buildDir}/${config}/x64_${target}_${config}.a)
+
+ # Lipo the object files together to a single fat archive
+ add_library(${target}_${config} STATIC IMPORTED GLOBAL)
+ add_custom_command(
+ OUTPUT ${buildDir}/${config}/lib${target}_${config}.a
+ COMMAND lipo -create
+ -output ${buildDir}/${config}/lib${target}_${config}.a
+ ARGS
+ ${buildDir}/${config}/arm64_${target}_${config}.a
+ ${buildDir}/${config}/x64_${target}_${config}.a
+ DEPENDS
+ ${buildDir}/${config}/arm64_${target}_${config}.a
+ ${buildDir}/${config}/x64_${target}_${config}.a
+ USES_TERMINAL
+ VERBATIM
+ )
+ set_property(TARGET ${target}_${config}
+ PROPERTY IMPORTED_LOCATION_${cfg} ${buildDir}/${config}/lib${target}_${config}.a)
+ add_custom_target(generate2_${target}_${config}
+ DEPENDS ${buildDir}/${config}/lib${target}_${config}.a)
+ target_link_libraries(${target} PRIVATE ${target}_${config})
+
+ # Just link with dynamic libs once
+ target_link_libraries(${target} PUBLIC "$<$<CONFIG:${config}>:${${cfg}_NINJA_LIBS}>")
+endfunction()
+
function(qt_internal_add_external_project_dependency_to_root_project name)
set(independent_args)
cmake_policy(PUSH)
@@ -702,15 +815,9 @@ macro(append_toolchain_setup)
if(CMAKE_SYSROOT)
list(APPEND gnArgArg target_sysroot="${CMAKE_SYSROOT}")
endif()
- endif()
- if(WIN32)
- list(APPEND gnArgArg target_cpu="x64")
- endif()
- if(MAC AND (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR
- CMAKE_OSX_ARCHITECTURES STREQUAL "arm64"))
- list(APPEND gnArgArg
- target_cpu="arm64"
- )
+ else()
+ get_gn_arch(cpu ${arch})
+ list(APPEND gnArgArg target_cpu="${cpu}")
endif()
endmacro()
@@ -762,7 +869,7 @@ macro(execute_ninja ninjaTargets)
${sandboxOutput}
${buildDir}/${config}/runAlways # use generator expression in CMAKE 3.20
WORKING_DIRECTORY ${buildDir}/${config}
- COMMAND ${CMAKE_COMMAND} -E echo "Ninja ${config} build"
+ COMMENT "Ninja ${arch} ${config} build"
COMMAND Ninja::ninja
${NINJAFLAGS}
-C ${buildDir}/${config}
diff --git a/configure.cmake b/configure.cmake
index 71821c484..9684661e5 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -320,14 +320,6 @@ qt_feature("webengine-ozone-x11" PRIVATE
)
#### Support Checks
-if(APPLE AND NOT IOS AND
- (CMAKE_OSX_ARCHITECTURES MATCHES ";")
-)
- set(MAC_UNIVERSAL ON)
-else()
- set(MAC_UNIVERSAL OFF)
-endif()
-
if(WIN32 AND (CMAKE_SYSTEM_PROCESSOR STREQUAL "arm64" OR CMAKE_CROSSCOMPILING))
set(WIN_ARM_64 ON)
else()
@@ -337,7 +329,7 @@ endif()
assertTargets(webEngineError webEngineSupport Gui Widgets OpenGL OpenGLWidgets Quick Qml)
add_check_for_support(webEngineError webEngineSupport
MODULE QtWebEngine
- CONDITION LINUX OR (WIN32 AND NOT WIN_ARM_64) OR (MACOS AND NOT MAC_UNIVERSAL)
+ 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."
)
if(LINUX AND CMAKE_CROSSCOMPILING)
diff --git a/src/3rdparty b/src/3rdparty
-Subproject 2e775bd831fbd8916b5fe285a28d8f4476a50f1
+Subproject b5b02c3da75a153f105c0ddf0d0e7fa7a1324c1
diff --git a/src/core/CMakeLists.txt b/src/core/CMakeLists.txt
index c4814b439..995c32475 100644
--- a/src/core/CMakeLists.txt
+++ b/src/core/CMakeLists.txt
@@ -45,465 +45,498 @@ else()
set(configs ${CMAKE_BUILD_TYPE})
endif()
+if(NOT QT_IS_MACOS_UNIVERSAL)
+ set(GN_ARCHITECTURES ${CMAKE_SYSTEM_PROCESSOR})
+else()
+ set(GN_ARCHITECTURES ${CMAKE_OSX_ARCHITECTURES})
+endif()
-foreach(config ${configs})
-##
-# BUILD.gn SETUP
-##
+foreach(arch ${GN_ARCHITECTURES})
+ if(QT_IS_MACOS_UNIVERSAL)
+ set(buildDir "${CMAKE_CURRENT_BINARY_DIR}/${arch}")
+ endif()
+
+ foreach(config ${configs})
+ ##
+ # BUILD.gn SETUP
+ ##
- unset(buildGn)
- set(buildGn buildGnWebEngineCore_${config})
+ unset(buildGn)
+ set(buildGn buildGnWebEngineCore_${config}_${arch})
- add_gn_target(${buildGn} SOURCES DEFINES CXX_COMPILE_OPTIONS C_COMPILE_OPTIONS INCLUDES)
+ add_gn_target(${buildGn} SOURCES DEFINES CXX_COMPILE_OPTIONS C_COMPILE_OPTIONS INCLUDES)
- resolve_target_includes(gnIncludes WebEngineCore)
- get_forward_declaration_macro(forwardDeclarationMacro)
- get_target_property(qtWebEngineProcessName WebEngineCore QTWEBENGINEPROCESS_NAME)
+ resolve_target_includes(gnIncludes WebEngineCore)
+ get_forward_declaration_macro(forwardDeclarationMacro)
+ get_target_property(qtWebEngineProcessName WebEngineCore QTWEBENGINEPROCESS_NAME)
- set(gnCxxCompileOptions "")
- if ("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
- # Silence warning in boringssl headers.
- list(APPEND gnCxxCompileOptions -Wno-ignored-qualifiers)
+ set(gnCxxCompileOptions "")
+ if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "GNU")
+ # Silence warning in boringssl headers.
+ list(APPEND gnCxxCompileOptions -Wno-ignored-qualifiers)
- if (CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0.0" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11.2.0")
- # GCC 11.1 has a regression in the integrated preprocessor, so disable it as a workaround (QTBUG-93360)
- # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100796
- list(APPEND gnCxxCompileOptions -no-integrated-cpp)
+ if(CMAKE_CXX_COMPILER_VERSION VERSION_GREATER_EQUAL "11.0.0" AND CMAKE_CXX_COMPILER_VERSION VERSION_LESS "11.2.0")
+ # GCC 11.1 has a regression in the integrated preprocessor, so disable it as a workaround (QTBUG-93360)
+ # https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100796
+ list(APPEND gnCxxCompileOptions -no-integrated-cpp)
+ endif()
endif()
- endif()
- extend_gn_target(${buildGn}
- INCLUDES
- ${gnIncludes}
- DEFINES
- QT_NO_KEYWORDS
- QT_USE_QSTRINGBUILDER
- QTWEBENGINECORE_VERSION_STR=\\\\\"${QT_REPO_MODULE_VERSION}\\\\\"
- QTWEBENGINEPROCESS_NAME=\\\\\"${qtWebEngineProcessName}\\\\\"
- BUILDING_CHROMIUM
- ${forwardDeclarationMacro}
- CXX_COMPILE_OPTIONS
- ${gnCxxCompileOptions}
- SOURCES
- accessibility_activation_observer.cpp accessibility_activation_observer.h
- accessibility_tree_formatter_qt.cpp
- authentication_dialog_controller.cpp authentication_dialog_controller.h authentication_dialog_controller_p.h
- browser_accessibility_manager_qt.cpp browser_accessibility_manager_qt.h
- browser_accessibility_qt.cpp browser_accessibility_qt.h
- browser_main_parts_qt.cpp browser_main_parts_qt.h
- browser_message_filter_qt.cpp browser_message_filter_qt.h
- browsing_data_remover_delegate_qt.cpp browsing_data_remover_delegate_qt.h
- build_config_qt.h
- certificate_error_controller.cpp certificate_error_controller.h
- chromium_overrides.cpp
- client_cert_select_controller.cpp client_cert_select_controller.h
- clipboard_change_observer.h
- clipboard_qt.cpp clipboard_qt.h
- color_chooser_controller.cpp color_chooser_controller.h color_chooser_controller_p.h
- color_chooser_qt.cpp color_chooser_qt.h
- common/qt_messages.cpp common/qt_messages.h
- compositor/compositor.cpp compositor/compositor.h
- compositor/content_gpu_client_qt.cpp compositor/content_gpu_client_qt.h
- compositor/display_overrides.cpp
- compositor/display_software_output_surface.cpp compositor/display_software_output_surface.h
- compositor/display_skia_output_device.cpp compositor/display_skia_output_device.h
- content_browser_client_qt.cpp content_browser_client_qt.h
- content_client_qt.cpp content_client_qt.h
- content_main_delegate_qt.cpp content_main_delegate_qt.h
- content_utility_client_qt.cpp content_utility_client_qt.h
- delegated_frame_host_client_qt.cpp delegated_frame_host_client_qt.h
- desktop_screen_qt.cpp desktop_screen_qt.h
- devtools_frontend_qt.cpp devtools_frontend_qt.h
- devtools_manager_delegate_qt.cpp devtools_manager_delegate_qt.h
- download_manager_delegate_qt.cpp download_manager_delegate_qt.h
- favicon_driver_qt.cpp favicon_driver_qt.h
- favicon_service_factory_qt.cpp favicon_service_factory_qt.h
- file_picker_controller.cpp file_picker_controller.h
- find_text_helper.cpp find_text_helper.h
- global_descriptors_qt.h
- javascript_dialog_controller.cpp javascript_dialog_controller.h javascript_dialog_controller_p.h
- javascript_dialog_manager_qt.cpp javascript_dialog_manager_qt.h
- login_delegate_qt.cpp login_delegate_qt.h
- media_capture_devices_dispatcher.cpp media_capture_devices_dispatcher.h
- native_web_keyboard_event_qt.cpp
- net/client_cert_override.cpp net/client_cert_override.h
- net/client_cert_store_data.cpp net/client_cert_store_data.h
- net/cookie_monster_delegate_qt.cpp net/cookie_monster_delegate_qt.h
- net/custom_url_loader_factory.cpp net/custom_url_loader_factory.h
- net/proxy_config_monitor.cpp
- net/proxy_config_service_qt.cpp
- net/proxying_restricted_cookie_manager_qt.cpp net/proxying_restricted_cookie_manager_qt.h
- net/proxying_url_loader_factory_qt.cpp net/proxying_url_loader_factory_qt.h
- net/qrc_url_scheme_handler.cpp net/qrc_url_scheme_handler.h
- net/ssl_host_state_delegate_qt.cpp net/ssl_host_state_delegate_qt.h
- net/system_network_context_manager.cpp net/system_network_context_manager.h
- net/url_request_custom_job_delegate.cpp net/url_request_custom_job_delegate.h
- net/url_request_custom_job_proxy.cpp net/url_request_custom_job_proxy.h
- net/webui_controller_factory_qt.cpp net/webui_controller_factory_qt.h
- ozone/gl_context_qt.cpp ozone/gl_context_qt.h
- ozone/gl_ozone_egl_qt.cpp ozone/gl_ozone_egl_qt.h
- ozone/gl_share_context_qt.cpp ozone/gl_share_context_qt.h
- ozone/gl_surface_egl_qt.cpp ozone/gl_surface_egl_qt.h
- ozone/gl_surface_qt.cpp ozone/gl_surface_qt.h
- ozone/gl_surface_wgl_qt.cpp ozone/gl_surface_wgl_qt.h
- ozone/platform_window_qt.cpp ozone/platform_window_qt.h
- ozone/surface_factory_qt.cpp ozone/surface_factory_qt.h
- permission_manager_qt.cpp permission_manager_qt.h
- platform_notification_service_qt.cpp platform_notification_service_qt.h
- pref_service_adapter.cpp pref_service_adapter.h
- process_main.cpp
- profile_adapter.cpp profile_adapter.h
- profile_adapter_client.cpp profile_adapter_client.h
- profile_io_data_qt.cpp profile_io_data_qt.h
- profile_qt.cpp profile_qt.h
- proxy_config_monitor.h
- proxy_config_service_qt.h
- quota_permission_context_qt.cpp quota_permission_context_qt.h
- quota_request_controller.h
- quota_request_controller_impl.cpp quota_request_controller_impl.h
- register_protocol_handler_request_controller.h
- register_protocol_handler_request_controller_impl.cpp register_protocol_handler_request_controller_impl.h
- render_view_context_menu_qt.cpp render_view_context_menu_qt.h
- render_widget_host_view_qt.cpp render_widget_host_view_qt.h
- render_widget_host_view_qt_delegate.h
- render_widget_host_view_qt_delegate_client.cpp render_widget_host_view_qt_delegate_client.h
- renderer/content_renderer_client_qt.cpp renderer/content_renderer_client_qt.h
- renderer/content_settings_observer_qt.cpp renderer/content_settings_observer_qt.h
- renderer/render_configuration.cpp renderer/render_configuration.h
- renderer/render_frame_observer_qt.cpp renderer/render_frame_observer_qt.h
- renderer/user_resource_controller.cpp renderer/user_resource_controller.h
- renderer/web_engine_page_render_frame.cpp renderer/web_engine_page_render_frame.h
- renderer_host/user_resource_controller_host.cpp renderer_host/user_resource_controller_host.h
- renderer_host/web_engine_page_host.cpp renderer_host/web_engine_page_host.h
- request_controller.h
- resource_bundle_qt.cpp
- resource_context_qt.cpp resource_context_qt.h
- select_file_dialog_factory_qt.cpp select_file_dialog_factory_qt.h
- touch_handle_drawable_client.h
- touch_handle_drawable_qt.cpp touch_handle_drawable_qt.h
- touch_selection_controller_client_qt.cpp touch_selection_controller_client_qt.h
- touch_selection_menu_controller.cpp touch_selection_menu_controller.h
- type_conversion.cpp type_conversion.h
- user_notification_controller.cpp user_notification_controller.h
- user_script.cpp user_script.h
- visited_links_manager_qt.cpp visited_links_manager_qt.h
- web_contents_adapter.cpp web_contents_adapter.h
- web_contents_adapter_client.h
- web_contents_delegate_qt.cpp web_contents_delegate_qt.h
- web_contents_view_qt.cpp web_contents_view_qt.h
- web_engine_context.cpp web_engine_context.h
- web_engine_context_threads.cpp
- web_engine_error.cpp web_engine_error.h
- web_engine_library_info.cpp web_engine_library_info.h
- web_engine_settings.cpp web_engine_settings.h
- web_event_factory.cpp web_event_factory.h
- )
+ extend_gn_target(${buildGn}
+ INCLUDES
+ ${gnIncludes}
+ DEFINES
+ QT_NO_KEYWORDS
+ QT_USE_QSTRINGBUILDER
+ QTWEBENGINECORE_VERSION_STR=\\\\\"${QT_REPO_MODULE_VERSION}\\\\\"
+ QTWEBENGINEPROCESS_NAME=\\\\\"${qtWebEngineProcessName}\\\\\"
+ BUILDING_CHROMIUM
+ ${forwardDeclarationMacro}
+ CXX_COMPILE_OPTIONS
+ ${gnCxxCompileOptions}
+ SOURCES
+ accessibility_activation_observer.cpp accessibility_activation_observer.h
+ accessibility_tree_formatter_qt.cpp
+ authentication_dialog_controller.cpp authentication_dialog_controller.h authentication_dialog_controller_p.h
+ browser_accessibility_manager_qt.cpp browser_accessibility_manager_qt.h
+ browser_accessibility_qt.cpp browser_accessibility_qt.h
+ browser_main_parts_qt.cpp browser_main_parts_qt.h
+ browser_message_filter_qt.cpp browser_message_filter_qt.h
+ browsing_data_remover_delegate_qt.cpp browsing_data_remover_delegate_qt.h
+ build_config_qt.h
+ certificate_error_controller.cpp certificate_error_controller.h
+ chromium_overrides.cpp
+ client_cert_select_controller.cpp client_cert_select_controller.h
+ clipboard_change_observer.h
+ clipboard_qt.cpp clipboard_qt.h
+ color_chooser_controller.cpp color_chooser_controller.h color_chooser_controller_p.h
+ color_chooser_qt.cpp color_chooser_qt.h
+ common/qt_messages.cpp common/qt_messages.h
+ compositor/compositor.cpp compositor/compositor.h
+ compositor/content_gpu_client_qt.cpp compositor/content_gpu_client_qt.h
+ compositor/display_overrides.cpp
+ compositor/display_software_output_surface.cpp compositor/display_software_output_surface.h
+ compositor/display_skia_output_device.cpp compositor/display_skia_output_device.h
+ content_browser_client_qt.cpp content_browser_client_qt.h
+ content_client_qt.cpp content_client_qt.h
+ content_main_delegate_qt.cpp content_main_delegate_qt.h
+ content_utility_client_qt.cpp content_utility_client_qt.h
+ delegated_frame_host_client_qt.cpp delegated_frame_host_client_qt.h
+ desktop_screen_qt.cpp desktop_screen_qt.h
+ devtools_frontend_qt.cpp devtools_frontend_qt.h
+ devtools_manager_delegate_qt.cpp devtools_manager_delegate_qt.h
+ download_manager_delegate_qt.cpp download_manager_delegate_qt.h
+ favicon_driver_qt.cpp favicon_driver_qt.h
+ favicon_service_factory_qt.cpp favicon_service_factory_qt.h
+ file_picker_controller.cpp file_picker_controller.h
+ find_text_helper.cpp find_text_helper.h
+ global_descriptors_qt.h
+ javascript_dialog_controller.cpp javascript_dialog_controller.h javascript_dialog_controller_p.h
+ javascript_dialog_manager_qt.cpp javascript_dialog_manager_qt.h
+ login_delegate_qt.cpp login_delegate_qt.h
+ media_capture_devices_dispatcher.cpp media_capture_devices_dispatcher.h
+ native_web_keyboard_event_qt.cpp
+ net/client_cert_override.cpp net/client_cert_override.h
+ net/client_cert_store_data.cpp net/client_cert_store_data.h
+ net/cookie_monster_delegate_qt.cpp net/cookie_monster_delegate_qt.h
+ net/custom_url_loader_factory.cpp net/custom_url_loader_factory.h
+ net/proxy_config_monitor.cpp
+ net/proxy_config_service_qt.cpp
+ net/proxying_restricted_cookie_manager_qt.cpp net/proxying_restricted_cookie_manager_qt.h
+ net/proxying_url_loader_factory_qt.cpp net/proxying_url_loader_factory_qt.h
+ net/qrc_url_scheme_handler.cpp net/qrc_url_scheme_handler.h
+ net/ssl_host_state_delegate_qt.cpp net/ssl_host_state_delegate_qt.h
+ net/system_network_context_manager.cpp net/system_network_context_manager.h
+ net/url_request_custom_job_delegate.cpp net/url_request_custom_job_delegate.h
+ net/url_request_custom_job_proxy.cpp net/url_request_custom_job_proxy.h
+ net/webui_controller_factory_qt.cpp net/webui_controller_factory_qt.h
+ ozone/gl_context_qt.cpp ozone/gl_context_qt.h
+ ozone/gl_ozone_egl_qt.cpp ozone/gl_ozone_egl_qt.h
+ ozone/gl_share_context_qt.cpp ozone/gl_share_context_qt.h
+ ozone/gl_surface_egl_qt.cpp ozone/gl_surface_egl_qt.h
+ ozone/gl_surface_qt.cpp ozone/gl_surface_qt.h
+ ozone/gl_surface_wgl_qt.cpp ozone/gl_surface_wgl_qt.h
+ ozone/platform_window_qt.cpp ozone/platform_window_qt.h
+ ozone/surface_factory_qt.cpp ozone/surface_factory_qt.h
+ permission_manager_qt.cpp permission_manager_qt.h
+ platform_notification_service_qt.cpp platform_notification_service_qt.h
+ pref_service_adapter.cpp pref_service_adapter.h
+ process_main.cpp
+ profile_adapter.cpp profile_adapter.h
+ profile_adapter_client.cpp profile_adapter_client.h
+ profile_io_data_qt.cpp profile_io_data_qt.h
+ profile_qt.cpp profile_qt.h
+ proxy_config_monitor.h
+ proxy_config_service_qt.h
+ quota_permission_context_qt.cpp quota_permission_context_qt.h
+ quota_request_controller.h
+ quota_request_controller_impl.cpp quota_request_controller_impl.h
+ register_protocol_handler_request_controller.h
+ register_protocol_handler_request_controller_impl.cpp register_protocol_handler_request_controller_impl.h
+ render_view_context_menu_qt.cpp render_view_context_menu_qt.h
+ render_widget_host_view_qt.cpp render_widget_host_view_qt.h
+ render_widget_host_view_qt_delegate.h
+ render_widget_host_view_qt_delegate_client.cpp render_widget_host_view_qt_delegate_client.h
+ renderer/content_renderer_client_qt.cpp renderer/content_renderer_client_qt.h
+ renderer/content_settings_observer_qt.cpp renderer/content_settings_observer_qt.h
+ renderer/render_configuration.cpp renderer/render_configuration.h
+ renderer/render_frame_observer_qt.cpp renderer/render_frame_observer_qt.h
+ renderer/user_resource_controller.cpp renderer/user_resource_controller.h
+ renderer/web_engine_page_render_frame.cpp renderer/web_engine_page_render_frame.h
+ renderer_host/user_resource_controller_host.cpp renderer_host/user_resource_controller_host.h
+ renderer_host/web_engine_page_host.cpp renderer_host/web_engine_page_host.h
+ request_controller.h
+ resource_bundle_qt.cpp
+ resource_context_qt.cpp resource_context_qt.h
+ select_file_dialog_factory_qt.cpp select_file_dialog_factory_qt.h
+ touch_handle_drawable_client.h
+ touch_handle_drawable_qt.cpp touch_handle_drawable_qt.h
+ touch_selection_controller_client_qt.cpp touch_selection_controller_client_qt.h
+ touch_selection_menu_controller.cpp touch_selection_menu_controller.h
+ type_conversion.cpp type_conversion.h
+ user_notification_controller.cpp user_notification_controller.h
+ user_script.cpp user_script.h
+ visited_links_manager_qt.cpp visited_links_manager_qt.h
+ web_contents_adapter.cpp web_contents_adapter.h
+ web_contents_adapter_client.h
+ web_contents_delegate_qt.cpp web_contents_delegate_qt.h
+ web_contents_view_qt.cpp web_contents_view_qt.h
+ web_engine_context.cpp web_engine_context.h
+ web_engine_context_threads.cpp
+ web_engine_error.cpp web_engine_error.h
+ web_engine_library_info.cpp web_engine_library_info.h
+ web_engine_settings.cpp web_engine_settings.h
+ web_event_factory.cpp web_event_factory.h
+ )
- extend_gn_target(${buildGn} CONDITION QT_FEATURE_webengine_ozone_x11
- SOURCES
- ozone/gl_ozone_glx_qt.cpp ozone/gl_ozone_glx_qt.h
- ozone/gl_surface_glx_qt.cpp ozone/gl_surface_glx_qt.h
- )
+ extend_gn_target(${buildGn} CONDITION QT_FEATURE_webengine_ozone_x11
+ SOURCES
+ ozone/gl_ozone_glx_qt.cpp ozone/gl_ozone_glx_qt.h
+ ozone/gl_surface_glx_qt.cpp ozone/gl_surface_glx_qt.h
+ )
- extend_gn_target(${buildGn} CONDITION QT_FEATURE_opengl
- SOURCES
- compositor/compositor_resource_fence.cpp compositor/compositor_resource_fence.h
- compositor/display_gl_output_surface.cpp compositor/display_gl_output_surface.h
- )
+ extend_gn_target(${buildGn} CONDITION QT_FEATURE_opengl
+ SOURCES
+ compositor/compositor_resource_fence.cpp compositor/compositor_resource_fence.h
+ compositor/display_gl_output_surface.cpp compositor/display_gl_output_surface.h
+ )
- extend_gn_target(${buildGn} CONDITION MACOS AND QT_FEATURE_opengl
- SOURCES
- macos_context_type_helper.mm macos_context_type_helper.h
- )
+ extend_gn_target(${buildGn} CONDITION MACOS AND QT_FEATURE_opengl
+ SOURCES
+ macos_context_type_helper.mm macos_context_type_helper.h
+ )
- extend_gn_target(${buildGn} CONDITION QT_FEATURE_webengine_pepper_plugins
- SOURCES
- renderer/pepper/pepper_renderer_host_factory_qt.cpp renderer/pepper/pepper_renderer_host_factory_qt.h
- renderer/plugins/loadable_plugin_placeholder_qt.cpp renderer/plugins/loadable_plugin_placeholder_qt.h
- renderer_host/pepper/pepper_host_factory_qt.cpp renderer_host/pepper/pepper_host_factory_qt.h
- renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp renderer_host/pepper/pepper_isolated_file_system_message_filter.h
- )
+ extend_gn_target(${buildGn} CONDITION QT_FEATURE_webengine_pepper_plugins
+ SOURCES
+ renderer/pepper/pepper_renderer_host_factory_qt.cpp renderer/pepper/pepper_renderer_host_factory_qt.h
+ renderer/plugins/loadable_plugin_placeholder_qt.cpp renderer/plugins/loadable_plugin_placeholder_qt.h
+ renderer_host/pepper/pepper_host_factory_qt.cpp renderer_host/pepper/pepper_host_factory_qt.h
+ renderer_host/pepper/pepper_isolated_file_system_message_filter.cpp renderer_host/pepper/pepper_isolated_file_system_message_filter.h
+ )
- extend_gn_target(${buildGn} CONDITION QT_FEATURE_webengine_printing_and_pdf
- SOURCES
- printing/pdfium_document_wrapper_qt.cpp printing/pdfium_document_wrapper_qt.h
- printing/print_view_manager_base_qt.cpp printing/print_view_manager_base_qt.h
- printing/print_view_manager_qt.cpp printing/print_view_manager_qt.h
- printing/printer_worker.cpp printing/printer_worker.h
- renderer/print_web_view_helper_delegate_qt.cpp renderer/print_web_view_helper_delegate_qt.h
- )
+ extend_gn_target(${buildGn} CONDITION QT_FEATURE_webengine_printing_and_pdf
+ SOURCES
+ printing/pdfium_document_wrapper_qt.cpp printing/pdfium_document_wrapper_qt.h
+ printing/print_view_manager_base_qt.cpp printing/print_view_manager_base_qt.h
+ printing/print_view_manager_qt.cpp printing/print_view_manager_qt.h
+ printing/printer_worker.cpp printing/printer_worker.h
+ renderer/print_web_view_helper_delegate_qt.cpp renderer/print_web_view_helper_delegate_qt.h
+ )
- extend_gn_target(${buildGn} CONDITION QT_FEATURE_webengine_geolocation
- SOURCES
- location_provider_qt.cpp location_provider_qt.h
- )
+ extend_gn_target(${buildGn} CONDITION QT_FEATURE_webengine_geolocation
+ SOURCES
+ location_provider_qt.cpp location_provider_qt.h
+ )
- extend_gn_target(${buildGn} CONDITION QT_FEATURE_webengine_webchannel
- SOURCES
- renderer/web_channel_ipc_transport.cpp renderer/web_channel_ipc_transport.h
- renderer_host/web_channel_ipc_transport_host.cpp renderer_host/web_channel_ipc_transport_host.h
- )
+ extend_gn_target(${buildGn} CONDITION QT_FEATURE_webengine_webchannel
+ SOURCES
+ renderer/web_channel_ipc_transport.cpp renderer/web_channel_ipc_transport.h
+ renderer_host/web_channel_ipc_transport_host.cpp renderer_host/web_channel_ipc_transport_host.h
+ )
- extend_gn_target(${buildGn} CONDITION QT_FEATURE_webengine_extensions
- SOURCES
- common/extensions/extensions_api_provider_qt.cpp common/extensions/extensions_api_provider_qt.h
- common/extensions/extensions_client_qt.cpp common/extensions/extensions_client_qt.h
- extensions/component_extension_resource_manager_qt.cpp extensions/component_extension_resource_manager_qt.h
- extensions/extension_host_delegate_qt.cpp extensions/extension_host_delegate_qt.h
- extensions/extension_system_factory_qt.cpp extensions/extension_system_factory_qt.h
- extensions/extension_system_qt.cpp extensions/extension_system_qt.h
- extensions/extension_web_contents_observer_qt.cpp extensions/extension_web_contents_observer_qt.h
- extensions/extensions_api_client_qt.cpp extensions/extensions_api_client_qt.h
- extensions/extensions_browser_client_qt.cpp extensions/extensions_browser_client_qt.h
- extensions/messaging_delegate_qt.cpp extensions/messaging_delegate_qt.h
- extensions/mime_handler_view_guest_delegate_qt.cpp extensions/mime_handler_view_guest_delegate_qt.h
- extensions/pdf_iframe_navigation_throttle_qt.cpp extensions/pdf_iframe_navigation_throttle_qt.h
- extensions/plugin_service_filter_qt.cpp extensions/plugin_service_filter_qt.h
- net/plugin_response_interceptor_url_loader_throttle.cpp net/plugin_response_interceptor_url_loader_throttle.h
- renderer/extensions/extensions_dispatcher_delegate_qt.cpp renderer/extensions/extensions_dispatcher_delegate_qt.h
- renderer/extensions/extensions_renderer_client_qt.cpp renderer/extensions/extensions_renderer_client_qt.h
- renderer/extensions/renderer_permissions_policy_delegate_qt.cpp renderer/extensions/renderer_permissions_policy_delegate_qt.h
- renderer/extensions/resource_request_policy_qt.cpp renderer/extensions/resource_request_policy_qt.h
- )
+ extend_gn_target(${buildGn} CONDITION QT_FEATURE_webengine_extensions
+ SOURCES
+ common/extensions/extensions_api_provider_qt.cpp common/extensions/extensions_api_provider_qt.h
+ common/extensions/extensions_client_qt.cpp common/extensions/extensions_client_qt.h
+ extensions/component_extension_resource_manager_qt.cpp extensions/component_extension_resource_manager_qt.h
+ extensions/extension_host_delegate_qt.cpp extensions/extension_host_delegate_qt.h
+ extensions/extension_system_factory_qt.cpp extensions/extension_system_factory_qt.h
+ extensions/extension_system_qt.cpp extensions/extension_system_qt.h
+ extensions/extension_web_contents_observer_qt.cpp extensions/extension_web_contents_observer_qt.h
+ extensions/extensions_api_client_qt.cpp extensions/extensions_api_client_qt.h
+ extensions/extensions_browser_client_qt.cpp extensions/extensions_browser_client_qt.h
+ extensions/messaging_delegate_qt.cpp extensions/messaging_delegate_qt.h
+ extensions/mime_handler_view_guest_delegate_qt.cpp extensions/mime_handler_view_guest_delegate_qt.h
+ extensions/pdf_iframe_navigation_throttle_qt.cpp extensions/pdf_iframe_navigation_throttle_qt.h
+ extensions/plugin_service_filter_qt.cpp extensions/plugin_service_filter_qt.h
+ net/plugin_response_interceptor_url_loader_throttle.cpp net/plugin_response_interceptor_url_loader_throttle.h
+ renderer/extensions/extensions_dispatcher_delegate_qt.cpp renderer/extensions/extensions_dispatcher_delegate_qt.h
+ renderer/extensions/extensions_renderer_client_qt.cpp renderer/extensions/extensions_renderer_client_qt.h
+ renderer/extensions/renderer_permissions_policy_delegate_qt.cpp renderer/extensions/renderer_permissions_policy_delegate_qt.h
+ renderer/extensions/resource_request_policy_qt.cpp renderer/extensions/resource_request_policy_qt.h
+ )
- read_gn_target(${buildGn} ${WEBENGINE_ROOT_BUILD_DIR}/src/core/api/${config}/gn_config.cxx.cmake)
- read_gn_target(${buildGn} ${WEBENGINE_ROOT_BUILD_DIR}/src/core/api/${config}/gn_config.c.cmake)
- configure_gn_target(${buildGn} ${config}
- ${WEBENGINE_ROOT_SOURCE_DIR}/src/core/configure/BUILD.root.gn.in ${buildDir}/${config}/BUILD.gn)
+ read_gn_target(${buildGn} ${WEBENGINE_ROOT_BUILD_DIR}/src/core/api/${config}/gn_config.cxx.cmake)
+ read_gn_target(${buildGn} ${WEBENGINE_ROOT_BUILD_DIR}/src/core/api/${config}/gn_config.c.cmake)
+ configure_gn_target(${buildGn} ${config}
+ ${WEBENGINE_ROOT_SOURCE_DIR}/src/core/configure/BUILD.root.gn.in ${buildDir}/${config}/BUILD.gn)
-##
-# GN PARAMETERS SETUP
-##
+ ##
+ # GN PARAMETERS SETUP
+ ##
- unset(gnArgArg)
-
- append_build_type_setup(gnArgArg)
- append_compiler_linker_sdk_setup(gnArgArg)
- append_sanitizer_setup(gnArgArg)
- append_toolchain_setup(gnArgArg)
- append_pkg_config_setup(gnArgArg)
-
- list(APPEND gnArgArg
- qtwebengine_target="${buildDir}/${config}:QtWebEngineCore"
- enable_media_remoting=false
- enable_message_center=false
- enable_nacl=false
- enable_remoting=false
- enable_reporting=false
- enable_resource_allowlist_generation=false
- enable_swiftshader=false
- enable_swiftshader_vulkan=false
- angle_enable_swiftshader=false
- enable_web_speech=false
- enable_widevine=true
- has_native_accessibility=false
- safe_browsing_mode=0
- skia_use_dawn=false
- toolkit_views=false
- chrome_pgo_phase=0
- optimize_webui=false
- enable_js_type_check=false
- v8_use_external_startup_data=false
- strip_absolute_paths_from_debug_symbols=false
- blink_symbol_level=0
- )
+ unset(gnArgArg)
- extend_gn_list(gnArgArg
- ARGS enable_basic_printing enable_print_preview enable_pdf
- CONDITION QT_FEATURE_webengine_printing_and_pdf
- )
- extend_gn_list(gnArgArg
- ARGS enable_plugins
- CONDITION QT_FEATURE_webengine_pepper_plugins
- )
- extend_gn_list(gnArgArg
- ARGS enable_spellcheck
- CONDITION QT_FEATURE_webengine_spellchecker
- )
- extend_gn_list(gnArgArg
- ARGS enable_webrtc
- CONDITION QT_FEATURE_webengine_webrtc
- )
- extend_gn_list(gnArgArg
- ARGS enable_hangout_services_extension
- CONDITION QT_FEATURE_webengine_webrtc AND QT_FEATURE_webengine_extensions
- )
- extend_gn_list(gnArgArg
- ARGS rtc_use_pipewire
- CONDITION QT_FEATURE_webengine_webrtc_pipewire
- )
- extend_gn_list(gnArgArg
- ARGS enable_extensions
- CONDITION QT_FEATURE_webengine_extensions
- )
- extend_gn_list(gnArgArg
- ARGS use_kerberos
- CONDITION QT_FEATURE_webengine_kerberos
- )
- extend_gn_list(gnArgArg
- ARGS proprietary_codecs
- CONDITION QT_FEATURE_webengine_proprietary_codecs
- )
- if(QT_FEATURE_webengine_proprietary_codecs)
- list(APPEND gnArgArg ffmpeg_branding="Chrome")
- endif()
- extend_gn_list(gnArgArg
- ARGS use_browser_spellchecker
- CONDITION QT_FEATURE_webengine_native_spellchecker
- )
+ append_build_type_setup(gnArgArg)
+ append_compiler_linker_sdk_setup(gnArgArg)
+ append_sanitizer_setup(gnArgArg)
+ append_toolchain_setup(gnArgArg)
+ append_pkg_config_setup(gnArgArg)
- if(LINUX)
list(APPEND gnArgArg
- use_cups=false
- use_gio=false
- use_gnome_keyring=false
- use_udev=true
- use_bundled_fontconfig=false
- enable_session_service=false
- is_cfi=false
- use_ozone=true
- use_x11=false
- ozone_auto_platforms=false
- ozone_platform_headless=false
- ozone_platform_external=true
- ozone_platform="qt"
- ozone_extra_path="${CMAKE_CURRENT_LIST_DIR}/ozone/ozone_extra.gni"
- use_glib=false
+ qtwebengine_target="${buildDir}/${config}:QtWebEngineCore"
+ enable_media_remoting=false
+ enable_message_center=false
+ enable_nacl=false
+ enable_remoting=false
+ enable_reporting=false
+ enable_resource_allowlist_generation=false
+ enable_swiftshader=false
+ enable_swiftshader_vulkan=false
+ angle_enable_swiftshader=false
+ enable_web_speech=false
+ enable_widevine=true
+ has_native_accessibility=false
+ safe_browsing_mode=0
+ skia_use_dawn=false
+ toolkit_views=false
+ chrome_pgo_phase=0
+ optimize_webui=false
+ enable_js_type_check=false
+ v8_use_external_startup_data=false
+ strip_absolute_paths_from_debug_symbols=false
+ blink_symbol_level=0
)
- set(systemLibs libjpeg libpng freetype harfbuzz libevent libwebp libxml
- opus snappy libvpx icu ffmpeg re2 lcms2
- )
- foreach(slib ${systemLibs})
- extend_gn_list(gnArgArg
- ARGS use_system_${slib}
- CONDITION QT_FEATURE_webengine_system_${slib}
- )
- endforeach()
+
extend_gn_list(gnArgArg
- ARGS icu_use_data_file
- CONDITION NOT QT_FEATURE_webengine_system_icu
+ ARGS enable_basic_printing enable_print_preview enable_pdf
+ CONDITION QT_FEATURE_webengine_printing_and_pdf
)
extend_gn_list(gnArgArg
- ARGS use_system_zlib use_system_minizip
- CONDITION QT_FEATURE_webengine_system_zlib AND QT_FEATURE_webengine_system_minizip
+ ARGS enable_plugins
+ CONDITION QT_FEATURE_webengine_pepper_plugins
)
extend_gn_list(gnArgArg
- ARGS pdfium_use_system_zlib
- CONDITION QT_FEATURE_webengine_system_zlib
+ ARGS enable_spellcheck
+ CONDITION QT_FEATURE_webengine_spellchecker
)
extend_gn_list(gnArgArg
- ARGS pdfium_use_system_libpng
- CONDITION QT_FEATURE_webengine_system_libpng
+ ARGS enable_webrtc
+ CONDITION QT_FEATURE_webengine_webrtc
)
extend_gn_list(gnArgArg
- ARGS use_libpci
- CONDITION QT_FEATURE_webengine_system_libpci
+ ARGS enable_hangout_services_extension
+ CONDITION QT_FEATURE_webengine_webrtc AND QT_FEATURE_webengine_extensions
)
extend_gn_list(gnArgArg
- ARGS use_alsa
- CONDITION QT_FEATURE_webengine_system_alsa
+ ARGS rtc_use_pipewire
+ CONDITION QT_FEATURE_webengine_webrtc_pipewire
)
extend_gn_list(gnArgArg
- ARGS use_pulseaudio
- CONDITION QT_FEATURE_webengine_system_pulseaudio
+ ARGS enable_extensions
+ CONDITION QT_FEATURE_webengine_extensions
)
extend_gn_list(gnArgArg
- ARGS ozone_platform_x11 use_xkbcommon
- CONDITION QT_FEATURE_webengine_ozone_x11
+ ARGS use_kerberos
+ CONDITION QT_FEATURE_webengine_kerberos
)
extend_gn_list(gnArgArg
- ARGS rtc_use_x11
- CONDITION QT_FEATURE_webengine_ozone_x11 AND QT_FEATURE_webengine_webrtc
+ ARGS proprietary_codecs
+ CONDITION QT_FEATURE_webengine_proprietary_codecs
)
+ if(QT_FEATURE_webengine_proprietary_codecs)
+ list(APPEND gnArgArg ffmpeg_branding="Chrome")
+ endif()
extend_gn_list(gnArgArg
- ARGS use_xscrnsaver
- CONDITION QT_FEATURE_webengine_ozone_x11 AND XSCRNSAVER_FOUND
+ ARGS use_browser_spellchecker
+ CONDITION QT_FEATURE_webengine_native_spellchecker
)
- if(CMAKE_CROSSCOMPILING AND cpu STREQUAL "arm")
- check_thumb(armThumb)
- if(NOT armThumb AND NOT QT_FEATURE_system_ffmpeg)
- list(APPEND gnArgArg media_use_ffmpeg=false use_webaudio_ffmpeg=false)
- endif()
+ if(LINUX)
+ list(APPEND gnArgArg
+ use_cups=false
+ use_gio=false
+ use_gnome_keyring=false
+ use_udev=true
+ use_bundled_fontconfig=false
+ enable_session_service=false
+ is_cfi=false
+ use_ozone=true
+ use_x11=false
+ ozone_auto_platforms=false
+ ozone_platform_headless=false
+ ozone_platform_external=true
+ ozone_platform="qt"
+ ozone_extra_path="${CMAKE_CURRENT_LIST_DIR}/ozone/ozone_extra.gni"
+ use_glib=false
+ )
+ set(systemLibs libjpeg libpng freetype harfbuzz libevent libwebp libxml
+ opus snappy libvpx icu ffmpeg re2 lcms2
+ )
+ foreach(slib ${systemLibs})
+ extend_gn_list(gnArgArg
+ ARGS use_system_${slib}
+ CONDITION QT_FEATURE_webengine_system_${slib}
+ )
+ endforeach()
+ extend_gn_list(gnArgArg
+ ARGS icu_use_data_file
+ CONDITION NOT QT_FEATURE_webengine_system_icu
+ )
+ extend_gn_list(gnArgArg
+ ARGS use_system_zlib use_system_minizip
+ CONDITION QT_FEATURE_webengine_system_zlib AND QT_FEATURE_webengine_system_minizip
+ )
+ extend_gn_list(gnArgArg
+ ARGS pdfium_use_system_zlib
+ CONDITION QT_FEATURE_webengine_system_zlib
+ )
+ extend_gn_list(gnArgArg
+ ARGS pdfium_use_system_libpng
+ CONDITION QT_FEATURE_webengine_system_libpng
+ )
+ extend_gn_list(gnArgArg
+ ARGS use_libpci
+ CONDITION QT_FEATURE_webengine_system_libpci
+ )
+ extend_gn_list(gnArgArg
+ ARGS use_alsa
+ CONDITION QT_FEATURE_webengine_system_alsa
+ )
+ extend_gn_list(gnArgArg
+ ARGS use_pulseaudio
+ CONDITION QT_FEATURE_webengine_system_pulseaudio
+ )
+ extend_gn_list(gnArgArg
+ ARGS ozone_platform_x11 use_xkbcommon
+ CONDITION QT_FEATURE_webengine_ozone_x11
+ )
+ extend_gn_list(gnArgArg
+ ARGS rtc_use_x11
+ CONDITION QT_FEATURE_webengine_ozone_x11 AND QT_FEATURE_webengine_webrtc
+ )
+ extend_gn_list(gnArgArg
+ ARGS use_xscrnsaver
+ CONDITION QT_FEATURE_webengine_ozone_x11 AND XSCRNSAVER_FOUND
+ )
+
+ if(CMAKE_CROSSCOMPILING AND cpu STREQUAL "arm")
+ check_thumb(armThumb)
+ if(NOT armThumb AND NOT QT_FEATURE_system_ffmpeg)
+ list(APPEND gnArgArg media_use_ffmpeg=false use_webaudio_ffmpeg=false)
+ endif()
+ endif()
endif()
- endif()
- if(MACOS)
- list(APPEND gnArgArg
- use_external_popup_menu=false
- angle_enable_vulkan=false
- )
- endif()
+ if(MACOS)
+ list(APPEND gnArgArg
+ use_external_popup_menu=false
+ angle_enable_vulkan=false
+ )
+ endif()
- if(WIN32)
- list(APPEND gnArgArg
- enable_location_source=false
- enable_session_service=false
- ninja_use_custom_environment_files=false
- com_init_check_hook_disabled=true
- heterogeneous_executables=true
- enable_vr=false
- )
- endif()
+ if(WIN32)
+ list(APPEND gnArgArg
+ enable_location_source=false
+ enable_session_service=false
+ ninja_use_custom_environment_files=false
+ com_init_check_hook_disabled=true
+ heterogeneous_executables=true
+ enable_vr=false
+ )
+ endif()
-##
-# GN CALL
-##
+ ##
+ # GN CALL
+ ##
- execute_gn(gnArgArg)
+ execute_gn(gnArgArg)
-##
-# NINJA CALL
-##
+ ##
+ # NINJA CALL
+ ##
- # config loop is a workaround to be able to add_custom_command per config
- # note this is fixed in CMAKE.3.20 and should be cleaned up when 3.20 is
- # the minimum cmake we support
+ # config loop is a workaround to be able to add_custom_command per config
+ # note this is fixed in CMAKE.3.20 and should be cleaned up when 3.20 is
+ # the minimum cmake we support
- if(WIN32)
- set(sandboxOutput ${buildDir}/${config}/QtWebEngineCoreSandbox.lib)
- set(sandboxTarget QtWebEngineCoreSandbox)
- else()
- unset(sandboxOutput)
- unset(sandboxTarget)
- endif()
+ if(WIN32)
+ set(sandboxOutput ${buildDir}/${config}/QtWebEngineCoreSandbox.lib)
+ set(sandboxTarget QtWebEngineCoreSandbox)
+ else()
+ unset(sandboxOutput)
+ unset(sandboxTarget)
+ endif()
- execute_ninja(QtWebEngineCore ${sandboxTarget})
+ execute_ninja(QtWebEngineCore ${sandboxTarget})
+ endforeach()
endforeach()
##
# WEBENGINECORE SETUP
##
+if (QT_IS_MACOS_UNIVERSAL)
+ target_include_directories(WebEngineCore PRIVATE
+ ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SYSTEM_PROCESSOR}/$<CONFIG>/gen
+ ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SYSTEM_PROCESSOR}/$<CONFIG>/gen/third_party/perfetto
+ ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SYSTEM_PROCESSOR}/$<CONFIG>/gen/third_party/perfetto/build_config
+ )
+else()
+ target_include_directories(WebEngineCore PRIVATE
+ ${buildDir}/$<CONFIG>/gen
+ ${buildDir}/$<CONFIG>/gen/third_party/perfetto
+ ${buildDir}/$<CONFIG>/gen/third_party/perfetto/build_config
+ )
+endif()
-target_include_directories(WebEngineCore PRIVATE
- ${buildDir}/$<CONFIG>/gen
- ${buildDir}/$<CONFIG>/gen/third_party/perfetto
- ${buildDir}/$<CONFIG>/gen/third_party/perfetto/build_config
-)
+if (QT_IS_MACOS_UNIVERSAL)
-if(WIN32)
- add_library(WebEngineCoreSandbox STATIC IMPORTED GLOBAL)
- add_dependencies(WebEngineCoreSandbox ninja)
-endif()
+ set(buildDir "${CMAKE_CURRENT_BINARY_DIR}")
+ foreach(config ${configs})
-foreach(config ${configs})
+ extend_target_with_gn_libs(WebEngineCore ${config} QtWebEngineCore.cmake QtWebEngineCore.stamp)
- extend_target_with_gn_objects(WebEngineCore ${config} QtWebEngineCore.cmake QtWebEngineCore.stamp)
+ endforeach()
+ # in the end, set the build dir back to one of the archs, to make sure the resources get copied alright
+ set(buildDir "${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_SYSTEM_PROCESSOR}")
- if(WIN32)
- string(TOUPPER ${config} cfg)
- set(sandboxLibraryPath ${buildDir}/${config}/QtWebEngineCoreSandbox.lib)
- set_property(TARGET WebEngineCoreSandbox
- PROPERTY IMPORTED_LOCATION_${cfg} ${sandboxLibraryPath})
- set_source_files_properties(${sandboxLibraryPath} PROPERTIES GENERATED TRUE)
- add_custom_command(OUTPUT ${sandboxLibraryPath} DEPENDS ${sandboxOutput})
- add_custom_target(generate_sandbox_${cfg} DEPENDS ${sandboxLibraryPath})
- endif()
+else()
-endforeach()
+ if(WIN32)
+ add_library(WebEngineCoreSandbox STATIC IMPORTED GLOBAL)
+ add_dependencies(WebEngineCoreSandbox ninja)
+ endif()
+
+ foreach(config ${configs})
+
+ extend_target_with_gn_objects(WebEngineCore ${config} QtWebEngineCore.cmake QtWebEngineCore.stamp)
+
+ if(WIN32)
+ string(TOUPPER ${config} cfg)
+ set(sandboxLibraryPath ${buildDir}/${config}/QtWebEngineCoreSandbox.lib)
+ set_property(TARGET WebEngineCoreSandbox
+ PROPERTY IMPORTED_LOCATION_${cfg} ${sandboxLibraryPath})
+ set_source_files_properties(${sandboxLibraryPath} PROPERTIES GENERATED TRUE)
+ add_custom_command(OUTPUT ${sandboxLibraryPath} DEPENDS ${sandboxOutput})
+ add_custom_target(generate_sandbox_${cfg} DEPENDS ${sandboxLibraryPath})
+ endif()
+
+ endforeach()
+
+endif()
##
# WEBENGINECORE RESOURCES
@@ -605,8 +638,16 @@ if(QT_FEATURE_webengine_spellchecker)
../3rdparty/chromium/third_party/boringssl/src/include
${buildDir}/${config}/gen
)
- foreach(config ${configs})
- extend_target_with_gn_objects(${dict_target_name} ${config} convert_dict.cmake "")
- endforeach()
+ if(QT_IS_MACOS_UNIVERSAL)
+ set(buildDir "${CMAKE_CURRENT_BINARY_DIR}")
+ foreach(config ${configs})
+ extend_target_with_gn_libs(${dict_target_name} ${config} convert_dict.cmake QtWebEngineCore.stamp)
+ endforeach()
+
+ else()
+ foreach(config ${configs})
+ extend_target_with_gn_objects(${dict_target_name} ${config} convert_dict.cmake "")
+ endforeach()
+ endif()
endif()