summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmake/Functions.cmake3
-rw-r--r--configure.cmake5
-rw-r--r--src/core/api/configure.cmake19
-rw-r--r--tests/auto/widgets/printing/CMakeLists.txt4
-rw-r--r--tests/auto/widgets/printing/tst_printing.cpp7
5 files changed, 31 insertions, 7 deletions
diff --git a/cmake/Functions.cmake b/cmake/Functions.cmake
index 08967d6db..77fef2114 100644
--- a/cmake/Functions.cmake
+++ b/cmake/Functions.cmake
@@ -880,6 +880,9 @@ macro(append_compiler_linker_sdk_setup)
ios_enable_code_signing=false
)
endif()
+ extend_gn_list(gnArgArg ARGS use_libcxx
+ CONDITION QT_FEATURE_stdlib_libcpp OR MACOS
+ )
else()
if(QT_FEATURE_use_lld_linker)
get_filename_component(clangBasePath ${CMAKE_LINKER} DIRECTORY)
diff --git a/configure.cmake b/configure.cmake
index 7d92341f8..106fe86d9 100644
--- a/configure.cmake
+++ b/configure.cmake
@@ -71,11 +71,14 @@ qt_config_compile_test(re2
CODE
"
#include \"re2/filtered_re2.h\"
+#include <vector>
int main() {
std::string s;
re2::FilteredRE2 fre2(1);
int id = 0;
fre2.Add(s, {}, &id);
+ std::vector<std::string> pattern = {\"match\"};
+ fre2.Compile(&pattern);
const RE2 &re2 = fre2.GetRE2(id);
}"
)
@@ -269,7 +272,7 @@ qt_feature("webengine-developer-build" PRIVATE
)
qt_feature("webengine-system-re2" PRIVATE
LABEL "re2"
- AUTODETECT UNIX AND TEST_re2
+ CONDITION UNIX AND TEST_re2
)
qt_feature("webengine-system-icu" PRIVATE
LABEL "icu"
diff --git a/src/core/api/configure.cmake b/src/core/api/configure.cmake
index 9da8324e8..b13d72555 100644
--- a/src/core/api/configure.cmake
+++ b/src/core/api/configure.cmake
@@ -8,6 +8,7 @@ if(NOT QT_CONFIGURE_RUNNING)
pkg_check_modules(ALSA alsa IMPORTED_TARGET)
pkg_check_modules(PULSEAUDIO libpulse>=0.9.10 libpulse-mainloop-glib)
pkg_check_modules(XDAMAGE xdamage)
+ pkg_check_modules(POPPLER_CPP poppler-cpp IMPORTED_TARGET)
if(NOT GIO_FOUND)
pkg_check_modules(GIO gio-2.0)
endif()
@@ -19,6 +20,19 @@ endif()
#### Tests
+qt_config_compile_test(poppler
+ LABEL "poppler"
+ LIBRARIES
+ PkgConfig::POPPLER_CPP
+ CODE
+"
+#include <poppler-document.h>
+
+int main() {
+ auto *pdf = poppler::document::load_from_raw_data(\"file\",100,std::string(\"user\"));
+}"
+)
+
qt_config_compile_test(alsa
LABEL "alsa"
LIBRARIES
@@ -131,6 +145,11 @@ qt_feature("webengine-sanitizer" PRIVATE
AUTODETECT CLANG
CONDITION CLANG AND ECM_ENABLE_SANITIZERS
)
+# internal testing feature
+qt_feature("webengine-system-poppler" PRIVATE
+ LABEL "popler"
+ CONDITION UNIX AND TEST_poppler
+)
qt_configure_add_summary_section(NAME "Qt WebEngineCore")
qt_configure_add_summary_entry(ARGS "webengine-embedded-build")
qt_configure_add_summary_entry(ARGS "webengine-full-debug-info")
diff --git a/tests/auto/widgets/printing/CMakeLists.txt b/tests/auto/widgets/printing/CMakeLists.txt
index e61b8cc89..9e14fd752 100644
--- a/tests/auto/widgets/printing/CMakeLists.txt
+++ b/tests/auto/widgets/printing/CMakeLists.txt
@@ -17,9 +17,7 @@ qt_internal_add_test(tst_printing
)
qt_internal_extend_target(tst_printing
- CONDITION POPPLER_CPP_FOUND
- DEFINES
- POPPLER_CPP
+ CONDITION POPPLER_CPP_FOUND AND QT_FEATURE_webengine_system_poppler
LIBRARIES
PkgConfig::POPPLER_CPP
)
diff --git a/tests/auto/widgets/printing/tst_printing.cpp b/tests/auto/widgets/printing/tst_printing.cpp
index 0559fb787..81d5d9442 100644
--- a/tests/auto/widgets/printing/tst_printing.cpp
+++ b/tests/auto/widgets/printing/tst_printing.cpp
@@ -27,13 +27,14 @@
****************************************************************************/
#include <QtWebEngineCore/private/qtwebenginecoreglobal_p.h>
+#include <QtWebEngineCore/qtwebenginecore-config.h>
#include <QWebEngineView>
#include <QTemporaryDir>
#include <QTest>
#include <QSignalSpy>
#include <util.h>
-#if defined(POPPLER_CPP)
+#if QT_CONFIG(webengine_system_poppler)
#include <poppler-document.h>
#include <poppler-page.h>
#endif
@@ -44,7 +45,7 @@ class tst_Printing : public QObject
private slots:
void printToPdfBasic();
void printRequest();
-#if defined(POPPLER_CPP) && defined(Q_OS_LINUX) && defined(__GLIBCXX__)
+#if QT_CONFIG(webengine_system_poppler)
void printToPdfPoppler();
#endif
};
@@ -110,7 +111,7 @@ void tst_Printing::printRequest()
QVERIFY(data.length() > 0);
}
-#if defined(POPPLER_CPP) && defined(Q_OS_LINUX) && defined(__GLIBCXX__)
+#if QT_CONFIG(webengine_system_poppler)
void tst_Printing::printToPdfPoppler()
{
// check if generated pdf is correct by searching for a know string on the page