summaryrefslogtreecommitdiffstats
path: root/src/3rdparty
diff options
context:
space:
mode:
authorAlexandru Croitor <alexandru.croitor@qt.io>2020-02-14 14:53:28 +0100
committerAlexandru Croitor <alexandru.croitor@qt.io>2020-02-25 15:43:16 +0100
commit26059d1b9b84bbaaa6c5a50a7dea88ffa9051c5a (patch)
tree8fb5694a33a28771f241db97c8b777ca0f5b9156 /src/3rdparty
parent1b474118326d0cc7a69b20d22d1e52d9ed42c07e (diff)
CMake: Allow building bundled 3rd party libraries in qtbase
A few things are needed to accomplish that: - the python scripts do not ignore certain system_foo features anymore (it is a hardcoded list for now just to be safe) - configurejson2cmake now outputs qt_find_package(WrapSystemFoo) calls for bundled libraries (see below) - the harfbuzz .pro file is modified to accommodate pro2cmake not being able to correctly parse some conditional scopes - the freetype .pro file is modified to make sure linking of the library succeeds without duplicate symbol errors, which qmake doesn't encounter due to magical exclusion of cpp files that are included in other cpp files (presumably for include moc_foo.cpp support) - feature evaluation for Core, Gui, Network now happens in the qtbase/src directory, so that bundled libraries can be conditionally built - for each bundled library there are now two FindWrap scripts: - FindWrapSystemFoo which finds an installed library in the system - FindWrapFoo which either uses the system installed library or the built bundled one depending on a condition - projects that intend to use bundled libraries need to link against WrapFoo::WrapFoo instead of WrapSystemFoo::WrapSystemFoo targets (this is handled by pro2cmake). Unfortunately manually added qt_find_package(WrapFoo) calls might still be needed as is the case for WrapFreetype and others. - a new cmake/QtFindWrapHelper.cmake file is added that provides a macro to simplify creation of WrapFoo targets that link against a bundled or system library. The implementation is fairly ugly due to CMake macro constraints, but it was deemed better than copy-pasting a bunch of almost identical code across all FindWrapFoo.cmake files. - a qtzlib header-only module is now created when using bundled zlib, to provide public syncqt created headers for consumers that need them. These are projects that have 'QT_PRIVATE += zlib-private' in their .pro files (e.g. qtimageformats, qtlocation, qt3d, etc.) This is unfortunately needed due to QtNetwork using zlib types in its private C++ API. The change includes support for building the following bundled libraries: - zlib - libpng - libjpeg - Freetype - Harfbuzz-ng - PCRE2 The following 3rd party libraries are still using an old implementation within the CMake build system, and should be migrated to the new one in the near future: - double-conversion - Old harfbuzz The are a few libraries that are not yet ported: - system-sqlite - systemxcb - maybe others Among other things, this change allows building qtbase on Windows without requiring vcpkg. Task-number: QTBUG-82167 Change-Id: I35ecea0d832f66c1943c82e618de4a51440971a5 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Simon Hausmann <simon.hausmann@qt.io> Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Diffstat (limited to 'src/3rdparty')
-rw-r--r--src/3rdparty/CMakeLists.txt20
-rw-r--r--src/3rdparty/freetype/CMakeLists.txt101
-rw-r--r--src/3rdparty/freetype/freetype.pro12
-rw-r--r--src/3rdparty/harfbuzz-ng/.prev_CMakeLists.txt179
-rw-r--r--src/3rdparty/harfbuzz-ng/CMakeLists.txt180
-rw-r--r--src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro7
-rw-r--r--src/3rdparty/libpng/CMakeLists.txt54
-rw-r--r--src/3rdparty/pcre2/CMakeLists.txt72
8 files changed, 616 insertions, 9 deletions
diff --git a/src/3rdparty/CMakeLists.txt b/src/3rdparty/CMakeLists.txt
index 79ff5cd93c..f9a6e7c68b 100644
--- a/src/3rdparty/CMakeLists.txt
+++ b/src/3rdparty/CMakeLists.txt
@@ -1,8 +1,24 @@
+# special case skip regeneration
+# The file is maintained manually
add_subdirectory(harfbuzz)
add_subdirectory(double-conversion)
-#special case begin
+if(QT_FEATURE_png AND NOT QT_FEATURE_system_png)
+ add_subdirectory(libpng)
+endif()
+
+if(QT_FEATURE_freetype AND NOT QT_FEATURE_system_freetype)
+ add_subdirectory(freetype)
+endif()
+
+if(QT_FEATURE_harfbuzz AND NOT QT_FEATURE_system_harfbuzz)
+ add_subdirectory(harfbuzz-ng)
+endif()
+
+if(QT_FEATURE_regularexpression AND NOT QT_FEATURE_system_pcre2)
+ add_subdirectory(pcre2)
+endif()
+
if (ANDROID)
add_subdirectory(gradle)
endif()
-#special case end
diff --git a/src/3rdparty/freetype/CMakeLists.txt b/src/3rdparty/freetype/CMakeLists.txt
new file mode 100644
index 0000000000..622b488c34
--- /dev/null
+++ b/src/3rdparty/freetype/CMakeLists.txt
@@ -0,0 +1,101 @@
+# Generated from freetype.pro.
+
+#####################################################################
+## BundledFreetype Generic Library:
+#####################################################################
+
+qt_add_3rdparty_library(BundledFreetype
+ STATIC
+ INSTALL
+ SOURCES
+ src/autofit/afdummy.c
+ src/autofit/afhints.c
+ src/autofit/aflatin.c
+ src/autofit/autofit.c
+ src/base/ftbase.c
+ src/base/ftbbox.c
+ src/base/ftbitmap.c
+ src/base/ftdebug.c
+ src/base/ftfntfmt.c
+ src/base/ftglyph.c
+ src/base/ftinit.c
+ src/base/ftlcdfil.c
+ src/base/ftmm.c
+ src/base/ftsynth.c
+ src/base/fttype1.c
+ src/bdf/bdf.c
+ src/cache/ftcache.c
+ src/cff/cff.c
+ src/cid/type1cid.c
+ src/gzip/ftgzip.c
+ src/lzw/ftlzw.c
+ src/otvalid/otvalid.c
+ src/otvalid/otvbase.c
+ src/otvalid/otvcommn.c
+ src/otvalid/otvgdef.c
+ src/otvalid/otvgpos.c
+ src/otvalid/otvgsub.c
+ src/otvalid/otvjstf.c
+ src/otvalid/otvmod.c
+ src/pcf/pcf.c
+ src/pfr/pfr.c
+ src/psaux/psaux.c
+ src/pshinter/pshinter.c
+ src/psnames/psmodule.c
+ src/raster/raster.c
+ src/sfnt/sfnt.c
+ src/smooth/smooth.c
+ src/truetype/truetype.c
+ src/type1/type1.c
+ src/type42/type42.c
+ src/winfonts/winfnt.c
+ DEFINES
+ FT2_BUILD_LIBRARY
+ FT_CONFIG_OPTION_SYSTEM_ZLIB
+ TT_CONFIG_OPTION_SUBPIXEL_HINTING
+ PUBLIC_INCLUDE_DIRECTORIES
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+)
+qt_disable_warnings(BundledFreetype)
+qt_set_symbol_visibility_hidden(BundledFreetype)
+
+#### Keys ignored in scope 1:.:.:freetype.pro:<TRUE>:
+# OTHER_FILES = "$$PWD/src/autofit/afangles.c" "$$PWD/src/autofit/afglobal.c" "$$PWD/src/autofit/afloader.c" "$$PWD/src/autofit/afmodule.c"
+# QT_FOR_CONFIG = "gui-private"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(BundledFreetype CONDITION WIN32
+ SOURCES
+ src/base/ftsystem.c
+)
+
+qt_extend_target(BundledFreetype CONDITION UNIX
+ SOURCES
+ builds/unix/ftsystem.c
+ INCLUDE_DIRECTORIES
+ builds/unix
+)
+
+qt_extend_target(BundledFreetype CONDITION QT_FEATURE_png
+ DEFINES
+ FT_CONFIG_OPTION_USE_PNG
+ LIBRARIES
+ WrapPNG::WrapPNG
+)
+
+qt_extend_target(BundledFreetype CONDITION QT_FEATURE_system_zlib
+ LIBRARIES
+ ZLIB::ZLIB
+)
+
+qt_extend_target(BundledFreetype CONDITION NOT QT_FEATURE_system_zlib
+ INCLUDE_DIRECTORIES
+ ../zlib/src
+)
+
+qt_extend_target(BundledFreetype CONDITION NOT QT_FEATURE_system_zlib AND NOT no_core_dep
+ LIBRARIES
+ Qt::Core
+)
diff --git a/src/3rdparty/freetype/freetype.pro b/src/3rdparty/freetype/freetype.pro
index 4034815158..0665de521b 100644
--- a/src/3rdparty/freetype/freetype.pro
+++ b/src/3rdparty/freetype/freetype.pro
@@ -11,13 +11,9 @@ MODULE_INCLUDEPATH += $$PWD/include
load(qt_helper_lib)
SOURCES += \
- $$PWD/src/autofit/afangles.c \
$$PWD/src/autofit/afdummy.c \
- $$PWD/src/autofit/afglobal.c \
$$PWD/src/autofit/afhints.c \
$$PWD/src/autofit/aflatin.c \
- $$PWD/src/autofit/afloader.c \
- $$PWD/src/autofit/afmodule.c \
$$PWD/src/autofit/autofit.c \
$$PWD/src/base/ftbase.c \
$$PWD/src/base/ftbitmap.c \
@@ -57,6 +53,14 @@ SOURCES += \
$$PWD/src/type42/type42.c \
$$PWD/src/winfonts/winfnt.c
+# These source files are included by one of the sources above
+# which means they should not be compiled as separate object files.
+OTHER_FILES += \
+ $$PWD/src/autofit/afangles.c \
+ $$PWD/src/autofit/afglobal.c \
+ $$PWD/src/autofit/afloader.c \
+ $$PWD/src/autofit/afmodule.c
+
win32 {
SOURCES += $$PWD/src/base/ftsystem.c
} else {
diff --git a/src/3rdparty/harfbuzz-ng/.prev_CMakeLists.txt b/src/3rdparty/harfbuzz-ng/.prev_CMakeLists.txt
new file mode 100644
index 0000000000..23e3689fe0
--- /dev/null
+++ b/src/3rdparty/harfbuzz-ng/.prev_CMakeLists.txt
@@ -0,0 +1,179 @@
+# Generated from harfbuzz-ng.pro.
+
+#####################################################################
+## BundledHarfbuzz Generic Library:
+#####################################################################
+
+qt_add_3rdparty_library(BundledHarfbuzz
+ STATIC
+ SOURCES
+ src/hb.h
+ src/hb-atomic-private.hh
+ src/hb-blob.cc src/hb-blob.h
+ src/hb-buffer.cc src/hb-buffer.h
+ src/hb-buffer-deserialize-json.hh
+ src/hb-buffer-deserialize-text.hh
+ src/hb-buffer-private.hh
+ src/hb-buffer-serialize.cc
+ src/hb-cache-private.hh
+ src/hb-common.cc src/hb-common.h
+ src/hb-debug.hh
+ src/hb-deprecated.h
+ src/hb-dsalgs.hh
+ src/hb-face.cc src/hb-face.h
+ src/hb-face-private.hh
+ src/hb-font.cc src/hb-font.h
+ src/hb-font-private.hh
+ src/hb-mutex-private.hh
+ src/hb-object-private.hh
+ src/hb-open-file-private.hh
+ src/hb-open-type-private.hh
+ src/hb-ot-cbdt-table.hh
+ src/hb-ot-cmap-table.hh
+ src/hb-ot-glyf-table.hh
+ src/hb-ot-head-table.hh
+ src/hb-ot-hhea-table.hh
+ src/hb-ot-hmtx-table.hh
+ src/hb-ot-maxp-table.hh
+ src/hb-ot-name-table.hh
+ src/hb-ot-os2-table.hh
+ src/hb-ot-post-table.hh
+ src/hb-ot-tag.cc
+ src/hb-private.hh
+ src/hb-set.cc src/hb-set.h
+ src/hb-set-digest-private.hh
+ src/hb-set-private.hh
+ src/hb-shape.cc src/hb-shape.h
+ src/hb-shape-plan.cc src/hb-shape-plan.h
+ src/hb-shape-plan-private.hh
+ src/hb-shaper.cc
+ src/hb-shaper-impl-private.hh
+ src/hb-shaper-list.hh
+ src/hb-shaper-private.hh
+ src/hb-string-array.hh
+ src/hb-unicode.cc src/hb-unicode.h
+ src/hb-unicode-private.hh
+ src/hb-utf-private.hh
+ src/hb-version.h
+ src/hb-warning.cc
+ DEFINES
+ HAVE_ATEXIT
+ HAVE_CONFIG_H
+ HB_DISABLE_DEPRECATED
+ HB_EXTERN=
+ HB_NDEBUG
+ HB_NO_UNICODE_FUNCS
+ QT_NO_VERSION_TAGGING
+ INCLUDE_DIRECTORIES
+ .core.includes
+ PUBLIC_INCLUDE_DIRECTORIES
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+)
+qt_disable_warnings(BundledHarfbuzz)
+qt_set_symbol_visibility_hidden(BundledHarfbuzz)
+
+#### Keys ignored in scope 1:.:.:harfbuzz-ng.pro:<TRUE>:
+# SHAPERS = "opentype"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(BundledHarfbuzz CONDITION APPLE
+ SOURCES
+ src/hb-coretext.cc src/hb-coretext.h
+ DEFINES
+ HAVE_CORETEXT
+)
+
+#### Keys ignored in scope 2:.:.:harfbuzz-ng.pro:APPLE:
+# SHAPERS = "coretext"
+
+qt_extend_target(BundledHarfbuzz CONDITION UNIX
+ DEFINES
+ HAVE_PTHREAD
+ HAVE_SCHED_H
+ HAVE_SCHED_YIELD
+)
+
+qt_extend_target(BundledHarfbuzz CONDITION WIN32
+ DEFINES
+ HB_NO_WIN1256
+)
+
+qt_extend_target(BundledHarfbuzz CONDITION ANDROID
+ DEFINES
+ _POSIX_C_SOURCE=200112L
+)
+
+qt_extend_target(BundledHarfbuzz CONDITION SHAPERS___contains___opentype
+ SOURCES
+ src/hb-ot.h
+ src/hb-ot-font.cc src/hb-ot-font.h
+ src/hb-ot-kern-table.hh
+ src/hb-ot-layout.cc src/hb-ot-layout.h
+ src/hb-ot-layout-common-private.hh
+ src/hb-ot-layout-gdef-table.hh
+ src/hb-ot-layout-gpos-table.hh
+ src/hb-ot-layout-gsub-table.hh
+ src/hb-ot-layout-gsubgpos-private.hh
+ src/hb-ot-layout-jstf-table.hh
+ src/hb-ot-layout-math-table.hh
+ src/hb-ot-layout-private.hh
+ src/hb-ot-map.cc
+ src/hb-ot-map-private.hh
+ src/hb-ot-math.cc src/hb-ot-math.h
+ src/hb-ot-math-table.hh
+ src/hb-ot-post-macroman.hh
+ src/hb-ot-shape.cc src/hb-ot-shape.h
+ src/hb-ot-shape-complex-arabic.cc
+ src/hb-ot-shape-complex-arabic-fallback.hh
+ src/hb-ot-shape-complex-arabic-private.hh
+ src/hb-ot-shape-complex-arabic-table.hh
+ src/hb-ot-shape-complex-default.cc
+ src/hb-ot-shape-complex-hangul.cc
+ src/hb-ot-shape-complex-hebrew.cc
+ src/hb-ot-shape-complex-indic.cc
+ src/hb-ot-shape-complex-indic-machine.hh
+ src/hb-ot-shape-complex-indic-private.hh
+ src/hb-ot-shape-complex-indic-table.cc
+ src/hb-ot-shape-complex-myanmar.cc
+ src/hb-ot-shape-complex-myanmar-machine.hh
+ src/hb-ot-shape-complex-private.hh
+ src/hb-ot-shape-complex-thai.cc
+ src/hb-ot-shape-complex-tibetan.cc
+ src/hb-ot-shape-complex-use.cc
+ src/hb-ot-shape-complex-use-machine.hh
+ src/hb-ot-shape-complex-use-private.hh
+ src/hb-ot-shape-complex-use-table.cc
+ src/hb-ot-shape-fallback.cc
+ src/hb-ot-shape-fallback-private.hh
+ src/hb-ot-shape-normalize.cc
+ src/hb-ot-shape-normalize-private.hh
+ src/hb-ot-shape-private.hh
+ src/hb-ot-tag.h
+ src/hb-ot-var.cc src/hb-ot-var.h
+ src/hb-ot-var-avar-table.hh
+ src/hb-ot-var-fvar-table.hh
+ src/hb-ot-var-hvar-table.hh
+ src/hb-ot-var-mvar-table.hh
+ DEFINES
+ HAVE_OT
+)
+
+qt_extend_target(BundledHarfbuzz CONDITION APPLE_UIKIT
+ LIBRARIES
+ ${FWCoreGraphics}
+ ${FWCoreText}
+)
+
+qt_extend_target(BundledHarfbuzz CONDITION APPLE AND NOT APPLE_UIKIT
+ LIBRARIES
+ ${FWApplicationServices}
+)
+
+qt_extend_target(BundledHarfbuzz CONDITION SHAPERS_ISEMPTY OR SHAPERS___contains___fallback
+ SOURCES
+ src/hb-fallback-shape.cc
+ DEFINES
+ HAVE_FALLBACK
+)
diff --git a/src/3rdparty/harfbuzz-ng/CMakeLists.txt b/src/3rdparty/harfbuzz-ng/CMakeLists.txt
new file mode 100644
index 0000000000..21ea01144a
--- /dev/null
+++ b/src/3rdparty/harfbuzz-ng/CMakeLists.txt
@@ -0,0 +1,180 @@
+# Generated from harfbuzz-ng.pro.
+
+#####################################################################
+## BundledHarfbuzz Generic Library:
+#####################################################################
+
+qt_add_3rdparty_library(BundledHarfbuzz
+ STATIC
+ SOURCES
+ src/hb.h
+ src/hb-atomic-private.hh
+ src/hb-blob.cc src/hb-blob.h
+ src/hb-buffer.cc src/hb-buffer.h
+ src/hb-buffer-deserialize-json.hh
+ src/hb-buffer-deserialize-text.hh
+ src/hb-buffer-private.hh
+ src/hb-buffer-serialize.cc
+ src/hb-cache-private.hh
+ src/hb-common.cc src/hb-common.h
+ src/hb-debug.hh
+ src/hb-deprecated.h
+ src/hb-dsalgs.hh
+ src/hb-face.cc src/hb-face.h
+ src/hb-face-private.hh
+ src/hb-font.cc src/hb-font.h
+ src/hb-font-private.hh
+ src/hb-mutex-private.hh
+ src/hb-object-private.hh
+ src/hb-open-file-private.hh
+ src/hb-open-type-private.hh
+ src/hb-ot-cbdt-table.hh
+ src/hb-ot-cmap-table.hh
+ src/hb-ot-glyf-table.hh
+ src/hb-ot-head-table.hh
+ src/hb-ot-hhea-table.hh
+ src/hb-ot-hmtx-table.hh
+ src/hb-ot-maxp-table.hh
+ src/hb-ot-name-table.hh
+ src/hb-ot-os2-table.hh
+ src/hb-ot-post-table.hh
+ src/hb-ot-tag.cc
+ src/hb-private.hh
+ src/hb-set.cc src/hb-set.h
+ src/hb-set-digest-private.hh
+ src/hb-set-private.hh
+ src/hb-shape.cc src/hb-shape.h
+ src/hb-shape-plan.cc src/hb-shape-plan.h
+ src/hb-shape-plan-private.hh
+ src/hb-shaper.cc
+ src/hb-shaper-impl-private.hh
+ src/hb-shaper-list.hh
+ src/hb-shaper-private.hh
+ src/hb-string-array.hh
+ src/hb-unicode.cc src/hb-unicode.h
+ src/hb-unicode-private.hh
+ src/hb-utf-private.hh
+ src/hb-version.h
+ src/hb-warning.cc
+ DEFINES
+ HAVE_ATEXIT
+ HAVE_CONFIG_H
+ HB_DISABLE_DEPRECATED
+ HB_EXTERN=
+ HB_NDEBUG
+ HB_NO_UNICODE_FUNCS
+ QT_NO_VERSION_TAGGING
+ INCLUDE_DIRECTORIES
+ $<TARGET_PROPERTY:Core,INCLUDE_DIRECTORIES> # special case
+ "${CMAKE_CURRENT_SOURCE_DIR}" # special case
+ PUBLIC_INCLUDE_DIRECTORIES
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
+)
+qt_disable_warnings(BundledHarfbuzz)
+qt_set_symbol_visibility_hidden(BundledHarfbuzz)
+
+#### Keys ignored in scope 1:.:.:harfbuzz-ng.pro:<TRUE>:
+# SHAPERS = "opentype"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(BundledHarfbuzz CONDITION APPLE
+ SOURCES
+ src/hb-coretext.cc src/hb-coretext.h
+ DEFINES
+ HAVE_CORETEXT
+)
+
+#### Keys ignored in scope 2:.:.:harfbuzz-ng.pro:APPLE:
+# SHAPERS = "coretext"
+
+qt_extend_target(BundledHarfbuzz CONDITION UNIX
+ DEFINES
+ HAVE_PTHREAD
+ HAVE_SCHED_H
+ HAVE_SCHED_YIELD
+)
+
+qt_extend_target(BundledHarfbuzz CONDITION WIN32
+ DEFINES
+ HB_NO_WIN1256
+)
+
+qt_extend_target(BundledHarfbuzz CONDITION ANDROID
+ DEFINES
+ _POSIX_C_SOURCE=200112L
+)
+
+qt_extend_target(BundledHarfbuzz CONDITION TRUE # special case
+ SOURCES
+ src/hb-ot.h
+ src/hb-ot-font.cc src/hb-ot-font.h
+ src/hb-ot-kern-table.hh
+ src/hb-ot-layout.cc src/hb-ot-layout.h
+ src/hb-ot-layout-common-private.hh
+ src/hb-ot-layout-gdef-table.hh
+ src/hb-ot-layout-gpos-table.hh
+ src/hb-ot-layout-gsub-table.hh
+ src/hb-ot-layout-gsubgpos-private.hh
+ src/hb-ot-layout-jstf-table.hh
+ src/hb-ot-layout-math-table.hh
+ src/hb-ot-layout-private.hh
+ src/hb-ot-map.cc
+ src/hb-ot-map-private.hh
+ src/hb-ot-math.cc src/hb-ot-math.h
+ src/hb-ot-math-table.hh
+ src/hb-ot-post-macroman.hh
+ src/hb-ot-shape.cc src/hb-ot-shape.h
+ src/hb-ot-shape-complex-arabic.cc
+ src/hb-ot-shape-complex-arabic-fallback.hh
+ src/hb-ot-shape-complex-arabic-private.hh
+ src/hb-ot-shape-complex-arabic-table.hh
+ src/hb-ot-shape-complex-default.cc
+ src/hb-ot-shape-complex-hangul.cc
+ src/hb-ot-shape-complex-hebrew.cc
+ src/hb-ot-shape-complex-indic.cc
+ src/hb-ot-shape-complex-indic-machine.hh
+ src/hb-ot-shape-complex-indic-private.hh
+ src/hb-ot-shape-complex-indic-table.cc
+ src/hb-ot-shape-complex-myanmar.cc
+ src/hb-ot-shape-complex-myanmar-machine.hh
+ src/hb-ot-shape-complex-private.hh
+ src/hb-ot-shape-complex-thai.cc
+ src/hb-ot-shape-complex-tibetan.cc
+ src/hb-ot-shape-complex-use.cc
+ src/hb-ot-shape-complex-use-machine.hh
+ src/hb-ot-shape-complex-use-private.hh
+ src/hb-ot-shape-complex-use-table.cc
+ src/hb-ot-shape-fallback.cc
+ src/hb-ot-shape-fallback-private.hh
+ src/hb-ot-shape-normalize.cc
+ src/hb-ot-shape-normalize-private.hh
+ src/hb-ot-shape-private.hh
+ src/hb-ot-tag.h
+ src/hb-ot-var.cc src/hb-ot-var.h
+ src/hb-ot-var-avar-table.hh
+ src/hb-ot-var-fvar-table.hh
+ src/hb-ot-var-hvar-table.hh
+ src/hb-ot-var-mvar-table.hh
+ DEFINES
+ HAVE_OT
+)
+
+qt_extend_target(BundledHarfbuzz CONDITION APPLE_UIKIT
+ LIBRARIES
+ ${FWCoreGraphics}
+ ${FWCoreText}
+)
+
+qt_extend_target(BundledHarfbuzz CONDITION APPLE AND NOT APPLE_UIKIT
+ LIBRARIES
+ ${FWApplicationServices}
+)
+
+qt_extend_target(BundledHarfbuzz CONDITION SHAPERS_ISEMPTY OR SHAPERS___contains___fallback
+ SOURCES
+ src/hb-fallback-shape.cc
+ DEFINES
+ HAVE_FALLBACK
+)
diff --git a/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro b/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro
index ad40b98753..54060e20ff 100644
--- a/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro
+++ b/src/3rdparty/harfbuzz-ng/harfbuzz-ng.pro
@@ -164,7 +164,7 @@ contains(SHAPERS, opentype) {
$$PWD/src/hb-ot-var.h
}
-contains(SHAPERS, coretext) {
+darwin {
DEFINES += HAVE_CORETEXT
SOURCES += \
@@ -173,13 +173,14 @@ contains(SHAPERS, coretext) {
HEADERS += \
$$PWD/src/hb-coretext.h
- uikit: \
+ uikit {
# On iOS/tvOS/watchOS CoreText and CoreGraphics are stand-alone frameworks
LIBS_PRIVATE += -framework CoreText -framework CoreGraphics
- else: \
+ } else {
# On Mac OS they are part of the ApplicationServices umbrella framework,
# even in 10.8 where they were also made available stand-alone.
LIBS_PRIVATE += -framework ApplicationServices
+ }
CONFIG += watchos_coretext
}
diff --git a/src/3rdparty/libpng/CMakeLists.txt b/src/3rdparty/libpng/CMakeLists.txt
new file mode 100644
index 0000000000..d1c5cea164
--- /dev/null
+++ b/src/3rdparty/libpng/CMakeLists.txt
@@ -0,0 +1,54 @@
+# Generated from libpng.pro.
+
+#####################################################################
+## BundledLibpng Generic Library:
+#####################################################################
+
+qt_add_3rdparty_library(BundledLibpng
+ STATIC
+ INSTALL
+ SOURCES
+ png.c
+ pngerror.c
+ pngget.c
+ pngmem.c
+ pngpread.c
+ pngread.c
+ pngrio.c
+ pngrtran.c
+ pngrutil.c
+ pngset.c
+ pngtrans.c
+ pngwio.c
+ pngwrite.c
+ pngwtran.c
+ pngwutil.c
+ DEFINES
+ PNG_ARM_NEON_OPT=0
+ PNG_POWERPC_VSX_OPT=0
+ PUBLIC_INCLUDE_DIRECTORIES
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
+)
+qt_disable_warnings(BundledLibpng)
+qt_set_symbol_visibility_hidden(BundledLibpng)
+
+#### Keys ignored in scope 1:.:.:libpng.pro:<TRUE>:
+# TR_EXCLUDE = "$$PWD/*"
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(BundledLibpng CONDITION QT_FEATURE_system_zlib
+ LIBRARIES
+ ZLIB::ZLIB
+)
+
+qt_extend_target(BundledLibpng CONDITION NOT QT_FEATURE_system_zlib
+ INCLUDE_DIRECTORIES
+ ../zlib/src
+)
+
+qt_extend_target(BundledLibpng CONDITION NOT QT_FEATURE_system_zlib AND NOT no_core_dep
+ LIBRARIES
+ Qt::Core
+)
diff --git a/src/3rdparty/pcre2/CMakeLists.txt b/src/3rdparty/pcre2/CMakeLists.txt
new file mode 100644
index 0000000000..76cddc83bc
--- /dev/null
+++ b/src/3rdparty/pcre2/CMakeLists.txt
@@ -0,0 +1,72 @@
+# Generated from pcre2.pro.
+
+#####################################################################
+## BundledPcre2 Generic Library:
+#####################################################################
+
+qt_add_3rdparty_library(BundledPcre2
+ STATIC
+ SOURCES
+ src/config.h
+ src/pcre2.h
+ src/pcre2_auto_possess.c
+ src/pcre2_chartables.c
+ src/pcre2_compile.c
+ src/pcre2_config.c
+ src/pcre2_context.c
+ src/pcre2_dfa_match.c
+ src/pcre2_error.c
+ src/pcre2_extuni.c
+ src/pcre2_find_bracket.c
+ src/pcre2_internal.h
+ src/pcre2_intmodedep.h
+ src/pcre2_jit_compile.c
+ src/pcre2_maketables.c
+ src/pcre2_match.c
+ src/pcre2_match_data.c
+ src/pcre2_newline.c
+ src/pcre2_ord2utf.c
+ src/pcre2_pattern_info.c
+ src/pcre2_script_run.c
+ src/pcre2_serialize.c
+ src/pcre2_string_utils.c
+ src/pcre2_study.c
+ src/pcre2_substitute.c
+ src/pcre2_substring.c
+ src/pcre2_tables.c
+ src/pcre2_ucd.c
+ src/pcre2_ucp.h
+ src/pcre2_valid_utf.c
+ src/pcre2_xclass.c
+ DEFINES
+ HAVE_CONFIG_H
+ PUBLIC_DEFINES
+ PCRE2_CODE_UNIT_WIDTH=16
+ PUBLIC_INCLUDE_DIRECTORIES
+ $<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/src>
+)
+qt_disable_warnings(BundledPcre2)
+qt_set_symbol_visibility_hidden(BundledPcre2)
+
+## Scopes:
+#####################################################################
+
+qt_extend_target(BundledPcre2 CONDITION WIN32
+ PUBLIC_DEFINES
+ PCRE2_STATIC
+)
+
+qt_extend_target(BundledPcre2 CONDITION APPLE_UIKIT OR QNX OR WINRT
+ DEFINES
+ PCRE2_DISABLE_JIT
+)
+
+qt_extend_target(BundledPcre2 CONDITION (TEST_architecture_arch STREQUAL "arm") AND WIN32
+ DEFINES
+ PCRE2_DISABLE_JIT
+)
+
+qt_extend_target(BundledPcre2 CONDITION (TEST_architecture_arch STREQUAL "arm64") AND WIN32
+ DEFINES
+ PCRE2_DISABLE_JIT
+)