aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/CMakeLists.txt
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@qt.io>2024-02-20 12:58:00 +0100
committerUlf Hermann <ulf.hermann@qt.io>2024-02-22 12:54:59 +0100
commitb61f05b14476454465724a91fceb86e2603356e7 (patch)
treed592f83b10fa442523e40f684e2053d6ef3c017a /src/qml/CMakeLists.txt
parentef05d2f3e2a3b82c4fb4f6615ffe64d045bc437f (diff)
QtQml: Make QQmlScriptString a builtin
It's really rather special. Pick-to: 6.7 Task-number: QTBUG-101364 Change-Id: I82899448d2b94ca67edd17772f773d4718619324 Reviewed-by: Semih Yavuz <semih.yavuz@qt.io>
Diffstat (limited to 'src/qml/CMakeLists.txt')
-rw-r--r--src/qml/CMakeLists.txt24
1 files changed, 13 insertions, 11 deletions
diff --git a/src/qml/CMakeLists.txt b/src/qml/CMakeLists.txt
index 282057e8c0..0b9dd7c68c 100644
--- a/src/qml/CMakeLists.txt
+++ b/src/qml/CMakeLists.txt
@@ -34,21 +34,23 @@ endif()
set_source_files_properties(
qml/qqmlcomponent.h qml/qqmlcomponent.cpp qml/qqmlcomponent_p.h
qml/qqmlcomponentattached_p.h
+ qml/qqmlscriptstring.h qml/qqmlscriptstring_p.h qml/qqmlscriptstring.cpp
PROPERTIES
SKIP_AUTOMOC TRUE
)
-# We want QQmlComponent and QQmlComponentAttached to be available as metatypes in the builtins,
-# but without depending on QtQml and without duplicating the metaobjects.
-qt_manual_moc(qqmlcomponent_moc_files
- OUTPUT_MOC_JSON_FILES qqmlcomponent_json_list
+# We want QQmlComponent, QQmlComponentAttached, and QQmlScriptString to be available as metatypes in
+# the builtins, but without depending on QtQml and without duplicating the metaobjects.
+qt_manual_moc(extra_builtins_moc_files
+ OUTPUT_MOC_JSON_FILES extra_builtins_json_list
qml/qqmlcomponent.h
qml/qqmlcomponentattached_p.h
+ qml/qqmlscriptstring.h
INCLUDE_DIRECTORY_TARGETS Qt::Qml
)
-# The moc files are included directly by qqmlcomponent.cpp
-set_source_files_properties(${qqmlcomponent_moc_files} PROPERTIES HEADER_FILE_ONLY ON)
+# The moc files are included directly by qqmlcomponent.cpp and qqmlscriptstring.cpp
+set_source_files_properties(${extra_builtins_moc_files} PROPERTIES HEADER_FILE_ONLY ON)
qt_internal_add_module(QmlBuiltins
STATIC
@@ -57,8 +59,8 @@ qt_internal_add_module(QmlBuiltins
qqmlbuiltins_p.h
)
-add_custom_target(QQmlComponentJson DEPENDS ${qqmlcomponent_json_list})
-add_custom_target(QQmlComponentMocs DEPENDS ${qqmlcomponent_moc_files})
+add_custom_target(ExtraBuiltinsJson DEPENDS ${extra_builtins_json_list})
+add_custom_target(ExtraBuiltinsMocs DEPENDS ${extra_builtins_moc_files})
target_link_libraries(QmlBuiltins PRIVATE Qt::Core Qt::QmlIntegration)
@@ -504,7 +506,7 @@ target_include_directories(QmlBuiltins PRIVATE
)
set(builtins_typeregistration_args
- MANUAL_MOC_JSON_FILES ${qqmlcomponent_json_list}
+ MANUAL_MOC_JSON_FILES ${extra_builtins_json_list}
REGISTRATIONS_TARGET Qml
)
@@ -514,7 +516,7 @@ if(qt_namespace)
endif()
_qt_internal_qml_type_registration(QmlBuiltins ${builtins_typeregistration_args})
-add_dependencies(QmlBuiltins QQmlComponentJson)
+add_dependencies(QmlBuiltins ExtraBuiltinsJson)
_qt_internal_get_tool_wrapper_script_path(tool_wrapper)
add_custom_command(
@@ -559,7 +561,7 @@ qt_install(
DESTINATION "${INSTALL_QMLDIR}"
)
-add_dependencies(Qml QQmlComponentMocs)
+add_dependencies(Qml ExtraBuiltinsMocs)
add_dependencies(Qml BuiltinsOutput)
qt_update_ignore_pch_source(Qml "compat/removed_api.cpp")