qt5base-lts/examples/CMakeLists.txt
Ahmad Samir 09b852b1d8 examples/: compile with QT_NO_CONTEXTLESS_CONNECT
Examples are usually a good way to get to know a new codebase, do not
teach developers who are new to Qt about the 3-arg connect() to begin
with.

Drive-by changes:
- `this` can't be implicitly captured with [=] in a lambda, instead
  capture by reference
- Update docs related to the sqlbrowser example; the overloaded signal
  it mentions has been removed in Qt6
- In the sqlbrowser example, rename addConnection() (no-arg) overload to
  openNewConnectionDialog, suggested in code review

Change-Id: I30c9f35bda4ac2f460d767ab7f84422ae3ed09f7
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2023-09-08 19:17:36 +03:00

42 lines
883 B
CMake

# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause
qt_examples_build_begin(EXTERNAL_BUILD)
add_compile_definitions(QT_NO_CONTEXTLESS_CONNECT)
add_subdirectory(corelib)
add_subdirectory(embedded)
if(TARGET Qt6::DBus)
add_subdirectory(dbus)
endif()
if(TARGET Qt6::Network)
add_subdirectory(network)
endif()
if(TARGET Qt6::Test)
add_subdirectory(qtestlib)
endif()
if(TARGET Qt6::Concurrent)
add_subdirectory(qtconcurrent)
endif()
if(TARGET Qt6::Sql)
add_subdirectory(sql)
endif()
if(TARGET Qt6::Widgets)
add_subdirectory(widgets)
endif()
if(TARGET Qt6::Xml)
add_subdirectory(xml)
endif()
if(TARGET Qt6::Gui)
add_subdirectory(gui)
endif()
if(QT_FEATURE_opengl AND TARGET Qt6::Gui)
add_subdirectory(opengl)
endif()
if(QT_FEATURE_vulkan AND TARGET Qt6::Gui)
add_subdirectory(vulkan)
endif()
qt_examples_build_end()