summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/test_global_promotion/CMakeLists.txt
blob: 7ec4c2e1716c930972e99fc9f5e40cd118a9049f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0

cmake_minimum_required(VERSION 3.16)

project(global_promotion)

add_subdirectory(subdir_with_local_qt)
add_subdirectory(subdir_with_global_qt)

set(file_path "${CMAKE_CURRENT_BINARY_DIR}/main.cpp")
file(GENERATE OUTPUT "${file_path}" CONTENT "int main() { return 0; }")
add_executable(exe main.cpp)

# The Qt targets found in the 2nd child directory scope should be available in this scope.
target_link_libraries(exe PRIVATE lib_global_qt)