aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEike Ziller <eike.ziller@qt.io>2024-02-07 14:58:37 +0100
committerEike Ziller <eike.ziller@qt.io>2024-02-13 08:57:00 +0000
commitce2baa83078dcc2723be497831e2314b02eacbf9 (patch)
tree312856e3cb1968171dda697dd990328284269a6e
parent2f28c237ae2c59e0b9102772dff6dcaf2b21ae9c (diff)
Suppress warnings from litehtml headers when compiling qlitehtml
We do suppress warnings for compiling litehtml itself already, but the litehtml headers trigger compiler warnings when compiling qlitehtml too. Change-Id: I44e47498c3f9f94ccd6718d45b8a6583d5d9db02 Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io> Reviewed-by: Kai Köhne <kai.koehne@qt.io>
-rw-r--r--src/CMakeLists.txt5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2ed3c0a..bd82079 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -41,6 +41,11 @@ if(NOT TARGET litehtml AND EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/3rdparty/litehtml/
QT_COMPILE_OPTIONS_DISABLE_WARNINGS ON
)
+ # suppress compiler warnings from litehtml headers by making them "system"
+ # include directories
+ get_target_property(litehtml_includedirs litehtml INTERFACE_INCLUDE_DIRECTORIES)
+ target_include_directories(litehtml SYSTEM INTERFACE ${litehtml_includedirs})
+
set(CMAKE_POSITION_INDEPENDENT_CODE "${ORIG_FPIC}")
set(BUILD_SHARED_LIBS ${ORIG_BUILD_SHARED_LIBS})
# force optimized litehtml even in debug