summaryrefslogtreecommitdiffstats
path: root/src/pdf
diff options
context:
space:
mode:
authorMichal Klocek <michal.klocek@qt.io>2021-09-02 08:01:36 +0200
committerQt Cherry-pick Bot <cherrypick_bot@qt-project.org>2021-10-15 23:07:28 +0000
commit8e56d741fedf2435194c61bedb6308a96aea9862 (patch)
tree3f902137d3333d77ec2c858a772b7d3810fa26dd /src/pdf
parent43cf1296801992c169c30e248ba03c2a2364b564 (diff)
Remove the rest of qmake based configuration
The only not cover part in cmake port are: * ios builds for qtpdf * qt static dependecies for qpdf Change-Id: Iefe624c35d847b4a9c3cd970192487340b1657f9 Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io> (cherry picked from commit d155f3da5d6e8ad08fab040d8f748d3bbdb69039) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
Diffstat (limited to 'src/pdf')
-rw-r--r--src/pdf/config/common.pri78
-rw-r--r--src/pdf/config/ios.pri66
-rw-r--r--src/pdf/configure.json64
-rw-r--r--src/pdf/gn_run.pro69
-rw-r--r--src/pdf/pdf.pro31
-rw-r--r--src/pdf/pdfcore.pro87
-rw-r--r--src/pdf/pdfcore_generator.pro15
-rw-r--r--src/pdf/pdfcore_prl_generator.pro27
-rw-r--r--src/pdf/quick/quick.pro40
-rw-r--r--src/pdf/quick/resources.qrc10
10 files changed, 0 insertions, 487 deletions
diff --git a/src/pdf/config/common.pri b/src/pdf/config/common.pri
deleted file mode 100644
index 7e5459a2a..000000000
--- a/src/pdf/config/common.pri
+++ /dev/null
@@ -1,78 +0,0 @@
-include($$QTWEBENGINE_OUT_ROOT/src/pdf/qtpdf-config.pri)
-QT_FOR_CONFIG += pdf-private
-
-gn_args += use_nss_certs=false
-
-qtConfig(webengine-qt-png) {
- gn_args += pdfium_use_qt_libpng=true
- gn_args += "pdfium_qt_libpng_includes=\"$$system_path($$QMAKE_INCDIR_LIBPNG)\""
-}
-
-#qtConfig(webengine-qt-jpeg) {
-# gn_args += use_qt_libjpeg=true
-# gn_args += "qt_libjpeg_includes=\"$$system_path($$QMAKE_INCDIR_LIBJPEG)\""
-#}
-
-qtConfig(webengine-qt-harfbuzz) {
- gn_args += use_qt_harfbuzz=true
- gn_args += "qt_harfbuzz_includes=\"$$system_path($$QMAKE_INCDIR_HARFBUZZ)\""
-}
-
-qtConfig(webengine-qt-freetype) {
- gn_args += use_qt_freetype=true
- gn_args += "qt_freetype_includes=\"$$system_path($$QMAKE_INCDIR_FREETYPE)\""
-}
-
-qtConfig(webengine-qt-zlib) {
- win32 {
- CONFIG(debug, debug|release) {
- qtzlib = Qt5Cored.lib
- } else {
- qtzlib = Qt5Core.lib
- }
-
- } else { qtzlib = libQt5Core.a
- }
- gn_args += use_qt_zlib = true
- gn_args += "qt_zlib_includes=\["\
- "\"$$system_path($$[QT_INSTALL_HEADERS])\"," \
- "\"$$system_path($$[QT_INSTALL_HEADERS]/QtCore)\"," \
- "\"$$system_path($$[QT_INSTALL_HEADERS]/QtZlib)\"\]"
- gn_args += "qt_zlib=\"$$system_path($$[QT_INSTALL_LIBS]/$$qtzlib)\""
-}
-
-qtConfig(pdf-v8) {
- gn_args += pdf_enable_v8=true
-} else {
- gn_args += pdf_enable_v8=false
-}
-
-qtConfig(pdf-xfa) {
- gn_args += pdf_enable_xfa=true
-} else {
- gn_args += pdf_enable_xfa=false
-}
-
-qtConfig(pdf-xfa-bmp) {
- gn_args += pdf_enable_xfa_bmp=true
-} else {
- gn_args += pdf_enable_xfa_bmp=false
-}
-
-qtConfig(pdf-xfa-gif) {
- gn_args += pdf_enable_xfa_gif=true
-} else {
- gn_args += pdf_enable_xfa_gif=false
-}
-
-qtConfig(pdf-xfa-png) {
- gn_args += pdf_enable_xfa_png=true
-} else {
- gn_args += pdf_enable_xfa_png=false
-}
-
-qtConfig(pdf-xfa-tiff) {
- gn_args += pdf_enable_xfa_tiff=true
-} else {
- gn_args += pdf_enable_xfa_tiff=false
-}
diff --git a/src/pdf/config/ios.pri b/src/pdf/config/ios.pri
deleted file mode 100644
index c930c3fe3..000000000
--- a/src/pdf/config/ios.pri
+++ /dev/null
@@ -1,66 +0,0 @@
-load(functions)
-
-include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri)
-include($$QTWEBENGINE_OUT_ROOT/src/pdf/qtpdf-config.pri)
-QT_FOR_CONFIG += buildtools-private pdf-private
-
-clang_dir = $$which($${QMAKE_CXX})
-clang_dir = $$clean_path("$$dirname(clang_dir)/../")
-
-gn_args += \
-use_qt=true \
-closure_compile=false \
-is_component_build=false \
-is_shared=true \
-is_debug=true \
-enable_message_center=false \
-enable_nacl=false \
-enable_remoting=false \
-enable_reporting=false \
-enable_resource_allowlist_generation=false \
-enable_swiftshader=false \
-enable_web_speech=false \
-has_native_accessibility=false \
-enable_debugallocation=false \
-use_allocator_shim=false \
-use_allocator=\"none\" \
-use_custom_libcxx=false \
-v8_use_external_startup_data=false \
-toolkit_views=false \
-treat_warnings_as_errors=false \
-safe_browsing_mode=0 \
-optimize_webui=false \
-forbid_non_component_debug_builds=false \
-clang_use_chrome_plugins=false \
-use_xcode_clang=true \
-clang_base_path=\"$${clang_dir}\" \
-ios_enable_code_signing=false \
-target_os=\"ios\" \
-ios_deployment_target=\"$${QMAKE_IOS_DEPLOYMENT_TARGET}\" \
-mac_sdk_min=\"$${QMAKE_MAC_SDK_VERSION_MAJOR_MINOR}\" \
-enable_ios_bitcode=true \
-use_jumbo_build=false
-
-device:simulator {
- # we do fat libray
- gn_args+= \
- target_cpu=\"$${QMAKE_APPLE_DEVICE_ARCHS}\" \
- use_qt_fat_lib=true \
- arm_use_neon=false\
- # note this adds one arch of simulator at the moment, see also additional_target_cpus
- target_sysroot=\"$$xcodeSDKInfo(Path, $$device.sdk)\" \
- additional_target_sysroot=[\"$$xcodeSDKInfo(Path, $$simulator.sdk)\"]
-} else {
- simulator {
- equals(QMAKE_APPLE_SIMULATOR_ARCHS,"x86_64") {
- gn_args+=target_cpu=\"x64\"
- } else {
- gn_args+=target_cpu=\"$${QMAKE_APPLE_SIMULATOR_ARCHS}\"
- }
- gn_args+=target_sysroot=\"$$xcodeSDKInfo(Path, $$simulator.sdk)\"
- }
- device {
- gn_args+=target_cpu=\"$${QMAKE_APPLE_DEVICE_ARCHS}\"
- gn_args+=target_sysroot=\"$$xcodeSDKInfo(Path, $$device.sdk)\"
- }
-}
diff --git a/src/pdf/configure.json b/src/pdf/configure.json
deleted file mode 100644
index 069893660..000000000
--- a/src/pdf/configure.json
+++ /dev/null
@@ -1,64 +0,0 @@
-{
- "module": "pdf",
- "depends" : [ "buildtools-private" ],
- "testDir": "../../config.tests",
- "condition": "module.gui && features.webengine-qtpdf-support && features.build-qtpdf",
- "libraries": {
- },
- "tests": {
- },
- "features": {
- "pdf-v8": {
- "label": "Support V8",
- "purpose": "Enables javascript support.",
- "autoDetect": "false",
- "condition": "!config.ios",
- "output": ["privateFeature" ]
- },
- "pdf-xfa": {
- "label": "Support XFA",
- "purpose": "Enables XFA support.",
- "condition": "features.pdf-v8",
- "output": ["privateFeature" ]
- },
- "pdf-xfa-bmp": {
- "label": "Support XFA-BMP",
- "purpose": "Enables XFA-BMP support.",
- "condition": "features.pdf-xfa",
- "output": ["privateFeature" ]
- },
- "pdf-xfa-gif": {
- "label": "Support XFA-GIF",
- "purpose": "Enables XFA-GIF support.",
- "condition": "features.pdf-xfa",
- "output": ["privateFeature" ]
- },
- "pdf-xfa-png": {
- "label": "Support XFA-PNG",
- "purpose": "Enables XFA-PNG support.",
- "condition": "features.pdf-xfa",
- "output": ["privateFeature" ]
- },
- "pdf-xfa-tiff": {
- "label": "Support XFA-TIFF",
- "purpose": "Enables XFA-TIFF support.",
- "condition": "features.pdf-xfa",
- "output": ["privateFeature" ]
- }
- },
- "report": [
- ],
- "summary": [
- {
- "section": "Qt PDF",
- "entries": [
- "pdf-v8",
- "pdf-xfa",
- "pdf-xfa-bmp",
- "pdf-xfa-gif",
- "pdf-xfa-png",
- "pdf-xfa-tiff"
- ]
- }
- ]
-}
diff --git a/src/pdf/gn_run.pro b/src/pdf/gn_run.pro
deleted file mode 100644
index 70ee582a9..000000000
--- a/src/pdf/gn_run.pro
+++ /dev/null
@@ -1,69 +0,0 @@
-include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri)
-QT_FOR_CONFIG += buildtools-private
-
-TEMPLATE = aux
-
-qtConfig(debug_and_release): CONFIG += debug_and_release
-qtConfig(build_all): CONFIG += build_all
-
-qtConfig(webengine-system-ninja) {
- QT_TOOL.ninja.binary = ninja
-} else {
- QT_TOOL.ninja.binary = $$shell_quote($$shell_path($$ninjaPath()))
-}
-
-win32 {
- # Add the gnuwin32/bin subdir of qt5.git to PATH. Needed for calling bison and friends.
- gnuwin32path.name = PATH
- gnuwin32path.value = $$shell_path($$clean_path($$QTWEBENGINE_ROOT/../gnuwin32/bin))
- gnuwin32path.CONFIG += prepend
- exists($$gnuwin32path.value): QT_TOOL_ENV = gnuwin32path
-}
-
-qtPrepareTool(NINJA, ninja)
-QT_TOOL_ENV =
-
-build_pass|!debug_and_release {
- gn_binary = gn
-
- runninja.target = run_ninja
-
- # fixme: refine args
- gn_args = $$gnPdfArgs()
-
- # fixme: qtwebengine_target
- gn_args += "qtwebengine_target=\"$$system_path($$OUT_PWD/$$getConfigDir()):QtPdf\""
-
- # fixme:
- !qtConfig(webengine-system-gn) {
- gn_binary = $$system_quote($$system_path($$gnPath()))
- }
-
- gn_args = $$system_quote($$gn_args)
- gn_src_root = $$system_quote($$system_path($$QTWEBENGINE_ROOT/$$getChromiumSrcDir()))
- gn_build_root = $$system_quote($$system_path($$OUT_PWD/$$getConfigDir()))
- gn_python = "--script-executable=$$pythonPathForSystem()"
- gn_run = $$gn_binary gen $$gn_build_root $$gn_python --args=$$gn_args --root=$$gn_src_root
-
- message("Running: $$gn_run ")
- !system($$gn_run) {
- error("GN run error!")
- }
-
- ninjaflags = $$(NINJAFLAGS)
- isEmpty(ninjaflags):!silent: ninjaflags = "-v"
-
- runninja.commands = $$NINJA $$ninjaflags -C $$gn_build_root QtPdf
- QMAKE_EXTRA_TARGETS += runninja
-
- build_pass:build_all: default_target.target = all
- else: default_target.target = first
- default_target.depends = runninja
- QMAKE_EXTRA_TARGETS += default_target
-}
-
-!build_pass:debug_and_release {
- # Special GNU make target for the meta Makefile that ensures that our debug and release Makefiles won't both run ninja in parallel.
- notParallel.target = .NOTPARALLEL
- QMAKE_EXTRA_TARGETS += notParallel
-}
diff --git a/src/pdf/pdf.pro b/src/pdf/pdf.pro
deleted file mode 100644
index 9f98c32b0..000000000
--- a/src/pdf/pdf.pro
+++ /dev/null
@@ -1,31 +0,0 @@
-include($$QTWEBENGINE_OUT_ROOT/src/buildtools/qtbuildtools-config.pri)
-QT_FOR_CONFIG += buildtools-private
-TEMPLATE = subdirs
-pdfcore.file = pdfcore.pro
-pdfcore_generator.file = pdfcore_generator.pro
-gn_run.file = gn_run.pro
-pdfcore_prl_generator.file = pdfcore_prl_generator.pro
-gn_run.depends = pdfcore_generator
-pdfcore_prl_generator.depends = gn_run
-pdfcore.depends = pdfcore_prl_generator
-quick.depends = pdfcore
-
-!qtConfig(webengine-qtpdf-support):qtConfig(build-qtpdf)::!build_pass {
- !qtwebengine_makeCheckPdfError() {
- errorbuild.commands = @echo $$shell_quote("QtPdf will not be built. $${skipBuildReason}")
- } else {
- errorbuild.commands = @echo $$shell_quote("QtPdf module will not be built for unknown reason, please open a bug report at https://bugreports.qt.io")
- }
- errorbuild.CONFIG = phony
- QMAKE_EXTRA_TARGETS += errorbuild
- first.depends += errorbuild
- QMAKE_EXTRA_TARGETS += first
-} else {
- SUBDIRS += \
- pdfcore_generator \
- gn_run \
- pdfcore_prl_generator \
- pdfcore \
- quick
-}
-
diff --git a/src/pdf/pdfcore.pro b/src/pdf/pdfcore.pro
deleted file mode 100644
index bb7146853..000000000
--- a/src/pdf/pdfcore.pro
+++ /dev/null
@@ -1,87 +0,0 @@
-TARGET = QtPdf
-MODULE = pdf
-
-QT += gui core core-private
-QT_PRIVATE += network
-
-TEMPLATE = lib
-
-INCLUDEPATH += $$QTWEBENGINE_ROOT/src/pdf
-CHROMIUM_SRC_DIR = $$QTWEBENGINE_ROOT/$$getChromiumSrcDir()
-CHROMIUM_GEN_DIR = $$OUT_PWD/../$$getConfigDir()/gen
-INCLUDEPATH += $$QTWEBENGINE_ROOT/src/pdf \
- $$CHROMIUM_GEN_DIR \
- $$CHROMIUM_SRC_DIR \
- api
-
-DEFINES += QT_BUILD_PDF_LIB
-win32: DEFINES += NOMINMAX
-
-QMAKE_DOCS = $$PWD/doc/qtpdf.qdocconf
-
-gcc {
- QMAKE_CXXFLAGS_WARN_ON += -Wno-unused-parameter
-}
-
-msvc {
- QMAKE_CXXFLAGS_WARN_ON += -wd"4100"
-}
-
-include($${QTWEBENGINE_ROOT}/src/buildtools/config/linking.pri)
-
-# install static dependencies and handle prl files for static builds
-
-static:!isEmpty(NINJA_ARCHIVES) {
- static_dep_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}_static_dep.pri
- !include($${static_dep_pri}) {
- error("Could not find the prl information.")
- }
- ninja_archives = $$eval($$list($$NINJA_ARCHIVES))
- ninja_archs_install.files = $${ninja_archives}
- ninja_archs_install.path = $$[QT_INSTALL_LIBS]/static_chrome
- ninja_archs_install.CONFIG = no_check_exist
- INSTALLS += ninja_archs_install
-}
-
-SOURCES += \
- qpdfbookmarkmodel.cpp \
- qpdfdestination.cpp \
- qpdfdocument.cpp \
- qpdflinkmodel.cpp \
- qpdfpagenavigation.cpp \
- qpdfpagerenderer.cpp \
- qpdfsearchmodel.cpp \
- qpdfsearchresult.cpp \
- qpdfselection.cpp \
-
-# all "public" headers must be in "api" for sync script and to hide auto generated headers
-# by Chromium in case of in-source build
-
-HEADERS += \
- api/qpdfbookmarkmodel.h \
- api/qpdfdestination.h \
- api/qpdfdestination_p.h \
- api/qpdfdocument.h \
- api/qpdfdocument_p.h \
- api/qpdfdocumentrenderoptions.h \
- api/qtpdfglobal.h \
- api/qpdflinkmodel_p.h \
- api/qpdflinkmodel_p_p.h \
- api/qpdfnamespace.h \
- api/qpdfpagenavigation.h \
- api/qpdfpagerenderer.h \
- api/qpdfsearchmodel.h \
- api/qpdfsearchmodel_p.h \
- api/qpdfsearchresult.h \
- api/qpdfsearchresult_p.h \
- api/qpdfselection.h \
- api/qpdfselection_p.h \
-
-
-qtConfig(webengine-qt-freetype): QMAKE_USE += freetype
-qtConfig(webengine-qt-png): QMAKE_USE += libpng
-qtConfig(webengine-qt-harfbuzz): QMAKE_USE += harfbuzz
-#qtConfig(webengine-qt-jpeg): QMAKE_USE += libjpeg
-qtConfig(webengine-qt-zlib){} #qtzlib is a part of QtCore
-
-load(qt_module)
diff --git a/src/pdf/pdfcore_generator.pro b/src/pdf/pdfcore_generator.pro
deleted file mode 100644
index e5c7258b7..000000000
--- a/src/pdf/pdfcore_generator.pro
+++ /dev/null
@@ -1,15 +0,0 @@
-qtConfig(debug_and_release): CONFIG += debug_and_release
-
-TARGET = QtPdf
-TEMPLATE = lib
-CONFIG = gn_generator $$CONFIG
-CONFIG -=static # note we still do static when linking
-GN_SRC_DIR = $$PWD
-GN_FILE = $$OUT_PWD/$$getConfigDir()/BUILD.gn
-GN_FIND_MOCABLES_SCRIPT = $$shell_path($$QTWEBENGINE_ROOT/tools/scripts/gn_find_mocables.py)
-GN_RUN_BINARY_SCRIPT = $$shell_path($$QTWEBENGINE_ROOT/tools/scripts/gn_run_binary.py)
-GN_IMPORTS = $$PWD/qtpdf.gni
-GN_CREATE_PRI = true
-QMAKE_INTERNAL_INCLUDED_FILES = $$GN_IMPORTS $$GN_INCLUDES $$GN_FILE
-
-
diff --git a/src/pdf/pdfcore_prl_generator.pro b/src/pdf/pdfcore_prl_generator.pro
deleted file mode 100644
index 39fdaed40..000000000
--- a/src/pdf/pdfcore_prl_generator.pro
+++ /dev/null
@@ -1,27 +0,0 @@
-
-qtConfig(debug_and_release): CONFIG += debug_and_release
-
-TARGET = QtPdf
-TEMPLATE = aux
-
-build_pass|!debug_and_relase {
- linking_pri = $$OUT_PWD/$$getConfigDir()/$${TARGET}.pri
- !include($$linking_pri) {
- error("Could not find the linking information that gn should have generated.")
- }
-
- !isEmpty(NINJA_ARCHIVES) {
- prl_file = $$OUT_PWD/$$getConfigDir()/$${TARGET}_static_dep.pri
- ninja_archives = $$eval($$list($$NINJA_ARCHIVES))
- qqt_libdir = \$\$\$\$[QT_INSTALL_LIBS]
- for(ninja_arch, ninja_archives) {
- ninja_arch_name = $$basename(ninja_arch)
- ninja_arch_dirname = $$dirname(ninja_arch)
- prl_content += "ninja_arch_prl_replace_$${ninja_arch_name}.match = $${ninja_arch_dirname}"
- prl_content += "ninja_arch_prl_replace_$${ninja_arch_name}.replace = $${qqt_libdir}/static_chrome"
- prl_content += "ninja_arch_prl_replace_$${ninja_arch_name}.CONFIG = path"
- prl_content += "QMAKE_PRL_INSTALL_REPLACE += ninja_arch_prl_replace_$${ninja_arch_name}"
- }
- write_file($${prl_file}, prl_content)
- }
-}
diff --git a/src/pdf/quick/quick.pro b/src/pdf/quick/quick.pro
deleted file mode 100644
index 47c559091..000000000
--- a/src/pdf/quick/quick.pro
+++ /dev/null
@@ -1,40 +0,0 @@
-CXX_MODULE = qml
-TARGET = pdfplugin
-TARGETPATH = QtQuick/Pdf
-IMPORT_VERSION = 1.0
-
-# qpdfdocument_p.h includes pdfium headers which we must find in order to use private API
-CHROMIUM_SRC_DIR = $$QTWEBENGINE_ROOT/$$getChromiumSrcDir()
-INCLUDEPATH += $$CHROMIUM_SRC_DIR
-
-#QMAKE_DOCS = $$PWD/doc/qtquickpdf.qdocconf
-
-PDF_QML_FILES = \
- qml/PdfMultiPageView.qml \
- qml/PdfPageView.qml \
- qml/PdfScrollablePageView.qml \
-
-QML_FILES += $$PDF_QML_FILES qmldir
-
-RESOURCES += resources.qrc
-
-SOURCES += \
- plugin.cpp \
- qquickpdfdocument.cpp \
- qquickpdflinkmodel.cpp \
- qquickpdfnavigationstack.cpp \
- qquickpdfsearchmodel.cpp \
- qquickpdfselection.cpp \
- qquicktableviewextra.cpp \
-
-HEADERS += \
- qquickpdfdocument_p.h \
- qquickpdflinkmodel_p.h \
- qquickpdfnavigationstack_p.h \
- qquickpdfsearchmodel_p.h \
- qquickpdfselection_p.h \
- qquicktableviewextra_p.h \
-
-QT += pdf pdf-private gui core qml quick quick-private
-include($${OUT_PWD}/../$$getConfigDir()/QtPdf_static_dep.pri)
-load(qml_plugin)
diff --git a/src/pdf/quick/resources.qrc b/src/pdf/quick/resources.qrc
deleted file mode 100644
index 8270a2028..000000000
--- a/src/pdf/quick/resources.qrc
+++ /dev/null
@@ -1,10 +0,0 @@
-<RCC>
- <qresource prefix="/qt-project.org/qtpdf">
- <file>qml/+material/PdfStyle.qml</file>
- <file>qml/+universal/PdfStyle.qml</file>
- <file>qml/PdfStyle.qml</file>
- <file>qml/PdfMultiPageView.qml</file>
- <file>qml/PdfPageView.qml</file>
- <file>qml/PdfScrollablePageView.qml</file>
- </qresource>
-</RCC>