tests/auto/cmake/test_umbrella_config/components_found/CMakeLists.txt
raw| 1 | |
| 2 | # The module finds its dependencies |
| 3 | find_package(Qt5 5.1.0 |
| 4 | COMPONENTS Core |
| 5 | OPTIONAL_COMPONENTS DoesNotExist |
| 6 | ) |
| 7 | |
| 8 | if (NOT Qt5_FOUND) |
| 9 | message(SEND_ERROR "Qt5 umbrella package not found!") |
| 10 | endif() |
| 11 | |
| 12 | if (NOT Qt5Core_FOUND) |
| 13 | message(SEND_ERROR "Qt5Core package not found!") |
| 14 | endif() |
| 15 | |
| 16 | if (Qt5DoesNotExist_FOUND) |
| 17 | message(SEND_ERROR "Non-existent package found!") |
| 18 | endif() |