diff options
Diffstat (limited to 'src/assistant/CMakeLists.txt')
-rw-r--r-- | src/assistant/CMakeLists.txt | 39 |
1 files changed, 34 insertions, 5 deletions
diff --git a/src/assistant/CMakeLists.txt b/src/assistant/CMakeLists.txt index 2ad364db8..17d3c3c8c 100644 --- a/src/assistant/CMakeLists.txt +++ b/src/assistant/CMakeLists.txt @@ -1,15 +1,13 @@ -# Generated from assistant.pro. +# Copyright (C) 2022 The Qt Company Ltd. +# SPDX-License-Identifier: BSD-3-Clause -# special case begin if(NOT TARGET Qt::Sql OR NOT TARGET Qt::PrintSupport) return() endif() -# special case end qt_exclude_tool_directories_from_default_target( assistant qhelpgenerator - qcollectiongenerator ) if(NOT TARGET Qt::Sql) @@ -21,4 +19,35 @@ endif() add_subdirectory(help) add_subdirectory(assistant) add_subdirectory(qhelpgenerator) -add_subdirectory(qcollectiongenerator) + +set(QLITEHTML_BIN_PATH ${INSTALL_BINDIR}) +set(QLITEHTML_LIBRARY_PATH ${INSTALL_LIBDIR}) +set(QLITEHTML_LIBRARY_TYPE STATIC) +set(BUILD_SHARED_LIBS OFF) +set(BUILD_TESTING OFF) +if(QT_FEATURE_static_runtime AND MSVC) + set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$<CONFIG:Debug>:Debug>") +endif() +add_subdirectory(qlitehtml/src EXCLUDE_FROM_ALL) +if(TARGET qlitehtml) + qt_autogen_tools_initial_setup(qlitehtml) + # The litehtml and gumbo targets will not be available here if they are not built by Qt + # but found in the system, because they are imported only to the subdirectory scope + # where find_package was called. But that's fine, we wouldn't be able to set compiler flags + # on them anyway. + if(TARGET litehtml) + qt_internal_set_exceptions_flags(litehtml OFF) + qt_disable_warnings(litehtml) + endif() + if(TARGET gumbo) + qt_disable_warnings(gumbo) + endif() + qt_disable_warnings(qlitehtml) + qt_handle_multi_config_output_dirs(qlitehtml) + set_target_properties(qlitehtml PROPERTIES + RUNTIME_OUTPUT_DIRECTORY "${QT_BUILD_DIR}/${INSTALL_BINDIR}" + LIBRARY_OUTPUT_DIRECTORY "${QT_BUILD_DIR}/${INSTALL_LIBDIR}" + ARCHIVE_OUTPUT_DIRECTORY "${QT_BUILD_DIR}/${INSTALL_LIBDIR}") +else() + message(FATAL_ERROR "qlitehtml not found. Did you run git submodule update --init --recursive?") +endif() |