Prevent litehtml from downloading googletest, take 2

Put BUILD_TESTING into the cache, so it doesn't get overridden by the
default option in a clean build via policy CMP0077

Fixes: QTCREATORBUG-26626
Change-Id: I8b90286c82a60ba30eb9b036dac8fca3be82cc2e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Youri Westerman <tetracon@gmail.com>
This commit is contained in:
Eike Ziller
2021-12-02 11:01:46 +01:00
parent 4cbfdecaf3
commit 2e42c99522

View File

@@ -31,7 +31,7 @@ if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/qlitehtml/src/CMakeLists.txt)
set(QLITEHTML_DEVEL_EXCLUDE_FROM_ALL ON)
set(QLITEHTML_HEADER_PATH "${IDE_HEADER_INSTALL_PATH}/src/lib/qlitehtml")
set(QT_VERSION_MAJOR ${Qt5_VERSION_MAJOR})
set(BUILD_TESTING OFF) # otherwise litehtml downloads googletest
option(BUILD_TESTING "Build litehtml tests" OFF) # otherwise litehtml downloads googletest
add_subdirectory(qlitehtml/src)
endif()
if(TARGET qlitehtml)