aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/Qt6QmlBuildInternals.cmake
diff options
context:
space:
mode:
Diffstat (limited to 'src/qml/Qt6QmlBuildInternals.cmake')
-rw-r--r--src/qml/Qt6QmlBuildInternals.cmake14
1 files changed, 12 insertions, 2 deletions
diff --git a/src/qml/Qt6QmlBuildInternals.cmake b/src/qml/Qt6QmlBuildInternals.cmake
index c2018d71f8..a9b20235ad 100644
--- a/src/qml/Qt6QmlBuildInternals.cmake
+++ b/src/qml/Qt6QmlBuildInternals.cmake
@@ -91,7 +91,7 @@ function(qt_internal_add_qml_module target)
endif()
- if (arg_CPP_PLUGIN)
+ if (arg_CPP_PLUGIN OR arg_SOURCES)
set(no_create_option DO_NOT_CREATE_TARGET)
endif()
@@ -121,6 +121,16 @@ function(qt_internal_add_qml_module target)
qt_path_join(qml_module_install_dir ${QT_INSTALL_DIR} "${INSTALL_QMLDIR}/${arg_TARGET_PATH}")
+ set(qml_module_build_dir "")
+ if(NOT QT_WILL_INSTALL)
+ qt_path_join(qml_module_build_dir ${QT_INSTALL_DIR} "${INSTALL_QMLDIR}/${arg_TARGET_PATH}")
+ set(qml_module_build_dir OUTPUT_DIRECTORY "${qml_module_build_dir}")
+ endif()
+
+ if (arg_SOURCES AND NOT arg_TYPEINFO)
+ set(arg_TYPEINFO "plugins.qmltypes")
+ endif()
+
qt6_add_qml_module(${target}
${designer_supported_arg}
${no_create_option}
@@ -138,8 +148,8 @@ function(qt_internal_add_qml_module target)
OPTIONAL_IMPORTS "${arg_OPTIONAL_IMPORTS}"
TYPEINFO "${arg_TYPEINFO}"
DO_NOT_INSTALL_METADATA
- DO_NOT_CREATE_TARGET
INSTALL_QML_FILES
+ ${qml_module_build_dir}
INSTALL_LOCATION "${qml_module_install_dir}"
DEPENDENCIES ${arg_DEPENDENCIES}
RESOURCE_EXPORT "${INSTALL_CMAKE_NAMESPACE}${target}Targets"