Include harfbuzz header files without harfbuzz/ parent directory

This is in accordance to the examples from harfbuzz docs:

https://harfbuzz.github.io/ch03s03.html

The fix is because `pkg-config --cflags harfbuzz` returns
the subdirectory as include path, for example:

-I /usr/local/include/harfbuzz

and this caused the system-harfbuzz not to be found when
/usr/local/include was not included by default (recent change on
macOS) and the code was doing #include <harfbuzz/hb.h>.

Fixes: QTBUG-85568
Change-Id: I12a34638e8ad5e3085768828457f0bfa1a2c68ad
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This commit is contained in:
Dimitrios Apostolou 2020-07-15 13:31:38 +02:00
parent b9c85d6b0e
commit bf075da800
6 changed files with 6 additions and 6 deletions

View File

@ -59,7 +59,7 @@ qt_add_3rdparty_library(BundledHarfbuzz
INCLUDE_DIRECTORIES
.core.includes
PUBLIC_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/harfbuzz>
)
qt_disable_warnings(BundledHarfbuzz)
qt_set_symbol_visibility_hidden(BundledHarfbuzz)

View File

@ -61,7 +61,7 @@ qt_add_3rdparty_library(BundledHarfbuzz
$<TARGET_PROPERTY:Core,INCLUDE_DIRECTORIES> # special case
"${CMAKE_CURRENT_SOURCE_DIR}" # special case
PUBLIC_INCLUDE_DIRECTORIES
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include>
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}/include/harfbuzz>
)
qt_disable_warnings(BundledHarfbuzz)
qt_set_symbol_visibility_hidden(BundledHarfbuzz)

View File

@ -5,7 +5,7 @@ CONFIG += \
hide_symbols \
exceptions_off rtti_off warn_off
MODULE_INCLUDEPATH += $$PWD/include
MODULE_INCLUDEPATH += $$PWD/include/harfbuzz
load(qt_helper_lib)

View File

@ -236,7 +236,7 @@
"hb_buffer_destroy(buffer);"
]
},
"headers": "harfbuzz/hb.h",
"headers": "hb.h",
"sources": [
"-lharfbuzz"
]

View File

@ -55,7 +55,7 @@
#if QT_CONFIG(harfbuzz)
# include "qharfbuzzng_p.h"
# include <harfbuzz/hb-ot.h>
# include <hb-ot.h>
#endif
#include <algorithm>

View File

@ -59,7 +59,7 @@ QT_REQUIRE_CONFIG(harfbuzz);
#include <QtCore/qchar.h>
#if defined(QT_BUILD_GUI_LIB)
# include <harfbuzz/hb.h>
# include <hb.h>
#else
// a minimal set of HB types required for Qt libs other than Gui