| 1 |
# Copyright (C) 2022 The Qt Company Ltd. |
| 2 |
# SPDX-License-Identifier: BSD-3-Clause |
| 3 |
|
| 4 |
cmake_minimum_required(VERSION 3.16) |
| 5 |
|
| 6 |
project(global_promotion) |
| 7 |
|
| 8 |
add_subdirectory(subdir_with_local_qt) |
| 9 |
add_subdirectory(subdir_with_global_qt) |
| 10 |
|
| 11 |
set(file_path "${CMAKE_CURRENT_BINARY_DIR}/main.cpp") |
| 12 |
file(GENERATE OUTPUT "${file_path}" CONTENT "int main() { return 0; }") |
| 13 |
add_executable(exe main.cpp) |
| 14 |
|
| 15 |
# The Qt targets found in the 2nd child directory scope should be available in this scope. |
| 16 |
target_link_libraries(exe PRIVATE lib_global_qt) |