blob: 45358074d9d3adecda912e8e952ba6d4ee6607e3 (
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
|
# Copyright (C) 2022 The Qt Company Ltd.
# SPDX-License-Identifier: LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0
# Generated from qmltyperegistrar.pro.
#####################################################################
## tst_qmltyperegistrar Test:
#####################################################################
qt_manual_moc(moc_files OUTPUT_MOC_JSON_FILES json_list noextheader
INCLUDE_DIRECTORY_TARGETS Qt::Qml)
# Dummy target to pass --private-includes to qmltyperegistrar for tst_qmltyperegistrar.
# We want to test that it expects files named foo_p.h appearing in foreign metatypes
# to be in a private/ subdirectory. In particular, we have a foreign_p.h to exercise this.
# TODO: There should be more fine grained control over this.
qt_add_library(tst_qmltyperegistrarPrivate STATIC
dummy.cpp dummy_p.h
)
target_link_libraries(tst_qmltyperegistrarPrivate PRIVATE Qt::Core)
qt_internal_add_test(tst_qmltyperegistrar
SOURCES
hppheader.hpp
# noextheader special case
tst_qmltyperegistrar.cpp tst_qmltyperegistrar.h
foo.cpp foo.h duplicatedExports.h
${moc_files}
INCLUDE_DIRECTORIES
foreign
LIBRARIES
# Remove: Lforeign
Qt::Qml
foreign
tst_qmltyperegistrarPrivate
)
qt_internal_extend_target(tst_qmltyperegistrar CONDITION TARGET Qt::Quick
LIBRARIES
Qt::Quick
)
#### Keys ignored in scope 2:.:.:tst_qmltyperegistrar.pro:<TRUE>:
# QMLTYPES_FILENAME = "tst_qmltyperegistrar.qmltypes"
# QML_FOREIGN_METATYPES = "foreign/foreign_metatypes.json"
# QML_IMPORT_NAME = "QmlTypeRegistrarTest"
# QML_IMPORT_VERSION = "1.0"
# QML_PAST_MAJOR_VERSIONS = "0"
# TEMPLATE = "app"
## Scopes:
#####################################################################
# Simulate conditions that qt6_add_qml_module() would normally set up for us
set_target_properties(tst_qmltyperegistrar PROPERTIES
QT_QML_MODULE_VERSION 1.0
QT_QML_MODULE_PAST_MAJOR_VERSIONS 0
QT_QML_MODULE_URI QmlTypeRegistrarTest
QT_QML_MODULE_TYPEINFO tst_qmltyperegistrar.qmltypes
QT_QML_MODULE_OUTPUT_DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}
)
# qt6_add_qml_module() doesn't allow us to pass through MANUAL_MOC_JSON_FILES
# yet, so we have to call it directly to test that code path for now.
_qt_internal_qml_type_registration(tst_qmltyperegistrar MANUAL_MOC_JSON_FILES ${json_list})
add_subdirectory(foreign)
qt_add_library(tst-qmltyperegistrar-with-dashes)
qt_autogen_tools_initial_setup(tst-qmltyperegistrar-with-dashes)
target_link_libraries(tst-qmltyperegistrar-with-dashes PRIVATE Qt::Core Qt::Qml)
qt_enable_autogen_tool(tst-qmltyperegistrar-with-dashes "moc" ON)
qt_add_qml_module(tst-qmltyperegistrar-with-dashes
URI Module-With-Dashes
VERSION 1.0
AUTO_RESOURCE_PREFIX
SOURCES
foo.cpp foo.h
)
qt_autogen_tools_initial_setup(tst-qmltyperegistrar-with-dashesplugin)
add_subdirectory(VersionZero)
|