aboutsummaryrefslogtreecommitdiffstats
path: root/tests/auto/cmake/qmlquery/My/OtherThings/CMakeLists.txt
blob: 5d2bbc4fdd11780062dd59251e324e9abdd0db47 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: BSD-3-Clause

qt_policy(SET QTP0001 NEW)

function(verify_result keyword expected actual)
    if(NOT "${actual}" STREQUAL "${expected}")
        message(SEND_ERROR
            "  Expected ${keyword}: ${expected}\n"
            "  Actual   ${keyword}: ${actual}"
        )
    endif()
endfunction()

qt_add_qml_module(MyOtherThings
    URI My.OtherThings
    SOURCES
        test.h test.cpp
)

qt_query_qml_module(MyOtherThings
    QML_FILES qml_files2
    RESOURCES resources2
)

# empty resources and files
verify_result(RESOURCES "${resources2}" "")
verify_result(QML_FILES "${qml_files2}" "")