tests/auto/cmake/test_umbrella_config/components_not_found/CMakeLists.txt
raw| 1 | # Copyright (C) 2022 The Qt Company Ltd. |
| 2 | # SPDX-License-Identifier: BSD-3-Clause |
| 3 | |
| 4 | |
| 5 | # The module finds its dependencies |
| 6 | find_package(Qt6 |
| 7 | COMPONENTS Core DoesNotExist |
| 8 | ) |
| 9 | |
| 10 | if (Qt6_FOUND) |
| 11 | message(SEND_ERROR "Qt6 umbrella package found, though it should not be!") |
| 12 | endif() |
| 13 | |
| 14 | if (NOT Qt6Core_FOUND) |
| 15 | message(SEND_ERROR "Qt6Core package not found!") |
| 16 | endif() |
| 17 | |
| 18 | if (Qt6DoesNotExist_FOUND) |
| 19 | message(SEND_ERROR "Non-existent package found!") |
| 20 | endif() |