examples/widgets/painting/shared/use_lib.cmake
raw| 1 | # Copyright (C) 2022 The Qt Company Ltd. |
| 2 | # SPDX-License-Identifier: LicenseRef-Qt-Commercial OR BSD-3-Clause |
| 3 | |
| 4 | # Include this file in your example project to use the library defined in this directory. |
| 5 | # This avoids find_package calls in a directory scope different from the directory scope of the |
| 6 | # consuming target. |
| 7 | |
| 8 | if(NOT TARGET Qt::Widgets) |
| 9 | find_package(Qt6 REQUIRED COMPONENTS Widgets) |
| 10 | endif() |
| 11 | |
| 12 | add_subdirectory("${CMAKE_CURRENT_LIST_DIR}" painting_shared) |