* Enable Wayland QPA plugin * Enable icon themes * Avoid regular Harfbuzz CMake find module from being used
64 lines
2.4 KiB
Diff
64 lines
2.4 KiB
Diff
From f15877ee90f492397687f667127daada5e169d98 Mon Sep 17 00:00:00 2001
|
|
From: Martchus <martchus@gmx.net>
|
|
Date: Sun, 24 Apr 2022 23:00:27 +0200
|
|
Subject: [PATCH 09/12] Find fontconfig via pkg-config for correct handling of
|
|
its dependencies
|
|
|
|
CMake's own find module unforunately does not consider fontconfig's deps so
|
|
static builds will break due to expat missing on the linker-line.
|
|
|
|
Change-Id: I331cd6b1af4f2857279c90920d777977e80fdce5
|
|
---
|
|
cmake/FindFontconfig.cmake | 11 +++++++++++
|
|
src/gui/CMakeLists.txt | 2 +-
|
|
src/gui/configure.cmake | 2 +-
|
|
3 files changed, 13 insertions(+), 2 deletions(-)
|
|
create mode 100644 cmake/FindFontconfig.cmake
|
|
|
|
diff --git a/cmake/FindFontconfig.cmake b/cmake/FindFontconfig.cmake
|
|
new file mode 100644
|
|
index 0000000000..1a52327ae6
|
|
--- /dev/null
|
|
+++ b/cmake/FindFontconfig.cmake
|
|
@@ -0,0 +1,11 @@
|
|
+find_package(PkgConfig QUIET)
|
|
+
|
|
+if(NOT TARGET PkgConfig::Fontconfig)
|
|
+ pkg_check_modules(Fontconfig fontconfig IMPORTED_TARGET)
|
|
+
|
|
+ if (NOT TARGET PkgConfig::Fontconfig)
|
|
+ set(Fontconfig_FOUND 0)
|
|
+ endif()
|
|
+else()
|
|
+ set(Fontconfig_FOUND 1)
|
|
+endif()
|
|
diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt
|
|
index 4c5c42abb6..62e125cba8 100644
|
|
--- a/src/gui/CMakeLists.txt
|
|
+++ b/src/gui/CMakeLists.txt
|
|
@@ -730,7 +730,7 @@ qt_internal_extend_target(Gui CONDITION QT_FEATURE_fontconfig AND QT_FEATURE_fre
|
|
text/unix/qfontconfigdatabase.cpp text/unix/qfontconfigdatabase_p.h
|
|
text/unix/qfontenginemultifontconfig.cpp text/unix/qfontenginemultifontconfig_p.h
|
|
LIBRARIES
|
|
- Fontconfig::Fontconfig
|
|
+ PkgConfig::Fontconfig
|
|
)
|
|
|
|
qt_internal_extend_target(Gui CONDITION APPLE AND NOT MACOS
|
|
diff --git a/src/gui/configure.cmake b/src/gui/configure.cmake
|
|
index f59f0ab264..7f4be2da2c 100644
|
|
--- a/src/gui/configure.cmake
|
|
+++ b/src/gui/configure.cmake
|
|
@@ -35,7 +35,7 @@ set_package_properties(WrapFreetype PROPERTIES TYPE REQUIRED)
|
|
if(QT_FEATURE_system_zlib)
|
|
qt_add_qmake_lib_dependency(freetype zlib)
|
|
endif()
|
|
-qt_find_package(Fontconfig PROVIDED_TARGETS Fontconfig::Fontconfig MODULE_NAME gui QMAKE_LIB fontconfig)
|
|
+qt_find_package(Fontconfig PROVIDED_TARGETS PkgConfig::Fontconfig MODULE_NAME gui QMAKE_LIB fontconfig)
|
|
qt_add_qmake_lib_dependency(fontconfig freetype)
|
|
qt_find_package(gbm PROVIDED_TARGETS gbm::gbm MODULE_NAME gui QMAKE_LIB gbm)
|
|
qt_find_package(WrapSystemHarfbuzz 2.6.0 PROVIDED_TARGETS WrapSystemHarfbuzz::WrapSystemHarfbuzz MODULE_NAME gui QMAKE_LIB harfbuzz)
|
|
--
|
|
2.36.0
|
|
|