summaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/test_add_resources_delayed_file/CMakeLists.txt
blob: e62f16d4c135082cda8055eedcd5b170adb6ff1e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18

cmake_minimum_required(VERSION 3.14)

project(test_add_resources_delayed_file)

find_package(Qt6Core REQUIRED)

qt_add_resources(rcc_files "${CMAKE_CURRENT_BINARY_DIR}/test_add_resources_delayed_file.qrc")

file(WRITE "${CMAKE_CURRENT_BINARY_DIR}/test_add_resources_delayed_file.qrc" "<!DOCTYPE RCC><RCC version=\"1.0\">
<qresource prefix=\"/\">
    <file>${CMAKE_CURRENT_SOURCE_DIR}/resource_file.txt</file>
</qresource>
</RCC>
")

add_executable(test_add_resources_delayed_file main.cpp ${rcc_files})
target_link_libraries(test_add_resources_delayed_file PRIVATE Qt::Core)