summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2021-09-28 14:51:23 +0200
committerMichal Klocek <michal.klocek@qt.io>2021-10-28 11:42:08 +0200
commitde15db17eccbc42d5d867973e7af3b95debff186 (patch)
tree230b2e14329bb4d3eca19de3840de49f598c54e1 /src
parent6b66108d2604d70f357e20a480eb127266fe7e24 (diff)
Clean up build options
We can configure webenigne repository with FEATURE_qtpdf_build and FEATURE_qtwebegine_build so make them public. The handling is still affected by QTBUG-96936,however private vs public features will most likely get better handling soon. Fix build summary to better reflect build options. Pick-to: 6.2 Change-Id: Ic6ef54a68b68d0f05c520a058665e6294efbe041 Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/CMakeLists.txt37
-rw-r--r--src/webenginequick/CMakeLists.txt1
-rw-r--r--src/webenginequick/configure.cmake5
3 files changed, 21 insertions, 22 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 501a687f1..5ba4cb1c6 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -18,6 +18,10 @@ qt_feature_module_end(ONLY_EVALUATE_FEATURES)
# SUPPORT CHECK
##
+# TODO: here we should return FATAL_ERROR and ask user to define
+# FEATURE_qtwebenignebuild=OFF if one wants to only build qtpdf,
+# however our ci setup is not flexible enough and configure step must succeed
+
if(NOT ${QtWebEngine_SUPPORT})
add_custom_target(WebEngineErrorMessage ALL
${CMAKE_COMMAND} -E cmake_echo_color --red "QtWebEngine will not be built: ${QtWebEngine_ERROR}"
@@ -25,7 +29,11 @@ if(NOT ${QtWebEngine_SUPPORT})
VERBATIM
)
message("-- Support check for QtWebEngine failed: ${QtWebEngine_ERROR}")
- set(QT_FEATURE_qtwebengine_build OFF CACHE BOOL "Build QtWebEngine" FORCE)
+ set(QT_FEATURE_qtwebengine_build OFF CACHE BOOL "Build QtWebEngine Modules" FORCE)
+ set(QT_FEATURE_qtwebengine_core_build OFF CACHE BOOL "Build QtWebEngineCore" FORCE)
+ set(QT_FEATURE_qtwebengine_widgets_build OFF CACHE BOOL "Build QtWebEngineWidgets" FORCE)
+ set(QT_FEATURE_qtwebengine_quick_build OFF CACHE BOOL "Build QtWebEngineQuick" FORCE)
+
endif()
if(NOT ${QtPdf_SUPPORT})
@@ -44,29 +52,25 @@ if(NOT QT_FEATURE_qtwebengine_build AND NOT QT_FEATURE_qtpdf_build)
return()
endif()
-if(NOT QT_FEATURE_qtwebengine_build)
- set(QT_FEATURE_qtwebengine_widgets_build OFF CACHE BOOL "Build QtWebEngineWidgets" FORCE)
- set(QT_FEATURE_qtwebengine_quick_build OFF CACHE BOOL "Build QtWebEngineQuick" FORCE)
-endif()
-
##
# MODULES
##
-if(QT_FEATURE_qtwebengine_build)
+if(QT_FEATURE_qtwebengine_core_build)
add_subdirectory(core)
add_subdirectory(process)
- if(QT_FEATURE_qtwebengine_widgets_build)
- add_subdirectory(webenginewidgets)
- endif()
- if(QT_FEATURE_qtwebengine_quick_build)
- add_subdirectory(webenginequick)
- endif()
endif()
+if(QT_FEATURE_qtwebengine_widgets_build)
+ add_subdirectory(webenginewidgets)
+endif()
+if(QT_FEATURE_qtwebengine_quick_build)
+ add_subdirectory(webenginequick)
+endif()
+
if(QT_FEATURE_qtpdf_build)
add_subdirectory(pdf)
# keep log order, pdf build after webengine
- if(QT_FEATURE_qtwebengine_build)
+ if(QT_FEATURE_qtwebengine_core_build)
add_dependencies(run_pdf_GnReady WebEngineCore)
endif()
if(QT_FEATURE_qtwebengine_widgets_build)
@@ -101,7 +105,7 @@ if(NOT Ninja_FOUND)
-DCMAKE_INSTALL_PREFIX:PATH=<INSTALL_DIR>
-DCMAKE_PREFIX_PATH:PATH=<INSTALL_DIR>
)
- if(QT_FEATURE_qtwebengine_build)
+ if(QT_FEATURE_qtwebengine_core_build)
add_dependencies(run_core_NinjaReady ninja)
endif()
if(QT_FEATURE_qtpdf_build)
@@ -128,7 +132,7 @@ if(NOT Gn_FOUND)
-DCMAKE_PREFIX_PATH:PATH=<INSTALL_DIR>
-DWEBENGINE_ROOT_BUILD_DIR=${PROJECT_BINARY_DIR}
)
- if(QT_FEATURE_qtwebengine_build)
+ if(QT_FEATURE_qtwebengine_core_build)
add_dependencies(run_core_GnReady gn)
endif()
if(QT_FEATURE_qtpdf_build)
@@ -173,7 +177,6 @@ endif()
# install gn for cross build
if(LINUX AND INSTALL_GN)
get_install_config(installConfig)
- message(${installConfig})
install(
PROGRAMS ${installDir}/bin/gn
CONFIGURATIONS ${installConfig}
diff --git a/src/webenginequick/CMakeLists.txt b/src/webenginequick/CMakeLists.txt
index 05340a3a7..a7f7d86bd 100644
--- a/src/webenginequick/CMakeLists.txt
+++ b/src/webenginequick/CMakeLists.txt
@@ -58,3 +58,4 @@ qt_internal_extend_target(qtwebenginequickplugin
Qt::CorePrivate
Qt::WebEngineQuickPrivate
)
+
diff --git a/src/webenginequick/configure.cmake b/src/webenginequick/configure.cmake
index 683a3f383..649154301 100644
--- a/src/webenginequick/configure.cmake
+++ b/src/webenginequick/configure.cmake
@@ -1,12 +1,7 @@
-qt_feature("webenginequick-qml" PRIVATE
- LABEL "Support Qt WebEngine Qml"
- PURPOSE "Provides WebEngine Qml support."
-)
qt_feature("webenginequick-ui-delegates" PRIVATE
SECTION "WebEngine"
LABEL "UI Delegates"
)
qt_configure_add_summary_section(NAME "Qt WebEngineQuick")
-qt_configure_add_summary_entry(ARGS "webenginequick-qml")
qt_configure_add_summary_entry(ARGS "webenginequick-ui-delegates")
qt_configure_end_summary_section()