From 7920c03ff1954355d588baa466820a60afc9b587 Mon Sep 17 00:00:00 2001 From: Niclas Rosenvik Date: Fri, 28 May 2021 11:59:37 +0000 Subject: Fix support for using system supplied md4c library Add FindWrapSystemMd4c.cmake so that the old md4c target can be used as well as the new one and set WrapSystemMd4c_FOUND. Link to the imported target WrapSystemMd4c::WrapSystemMd4c if the system library is used. Add qt_find_package line to find the package in configure.cmake. Fix the condition for enabling system-textmarkdownreader, it includes testing for textmarkdownreader because even if the code would compile correctly without it, it looks strange when the output says "textmarkdownreader no" and under "using system libmd4c yes" even if libmd4c is not used. Use system include when system-markdownreader is enabled. Add library mapping for libmd4c. Change-Id: Id5d5b13d6691a8c1cdf627238887977c847c1e67 Reviewed-by: Shawn Rutledge Reviewed-by: Alexandru Croitor --- src/gui/text/qtextmarkdownimporter.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/gui/text/qtextmarkdownimporter.cpp') diff --git a/src/gui/text/qtextmarkdownimporter.cpp b/src/gui/text/qtextmarkdownimporter.cpp index 1e18f31c30..75b5a324c8 100644 --- a/src/gui/text/qtextmarkdownimporter.cpp +++ b/src/gui/text/qtextmarkdownimporter.cpp @@ -48,7 +48,11 @@ #include #include #include +#if QT_CONFIG(system_textmarkdownreader) +#include +#else #include "../../3rdparty/md4c/md4c.h" +#endif QT_BEGIN_NAMESPACE -- cgit v1.2.3