diff options
author | Craig Scott <craig.scott@qt.io> | 2021-07-21 19:23:22 +1000 |
---|---|---|
committer | Craig Scott <craig.scott@qt.io> | 2021-07-26 12:25:00 +1000 |
commit | e624271fd36055bc3237ae7a3d6006cdecb9fd74 (patch) | |
tree | ec642b15688964be39a92ee64f6df60e2e102e9c /src/qml/Qt6QmlBuildInternals.cmake | |
parent | f4b4e4fb2bbc89e69a91a7ef4d981546c0e8ae05 (diff) |
Make TARGET_PATH an internal option for QML CMake commands
TARGET_PATH should always be computed from the URI. In the past, there
were some rare temporary cases where it was slightly different to
assist with transitioning some existing QML modules. No internal uses
of overriding the TARGET_PATH remain now though and user projects
should always use a TARGET_PATH based on the URI. Keep the
implementation in the public command in case an unexpected use case
for it arises, but make it clear that it is now an internal option.
Also remove it from qt_internal_add_qml_module() since we know
it is not needed there now.
Fixes: QTBUG-95083
Pick-to: 6.2
Change-Id: I75928fc194b5da64424ec8a838c1db4c0441edcf
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Diffstat (limited to 'src/qml/Qt6QmlBuildInternals.cmake')
-rw-r--r-- | src/qml/Qt6QmlBuildInternals.cmake | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/qml/Qt6QmlBuildInternals.cmake b/src/qml/Qt6QmlBuildInternals.cmake index 645c8ca925..ea5d3606ce 100644 --- a/src/qml/Qt6QmlBuildInternals.cmake +++ b/src/qml/Qt6QmlBuildInternals.cmake @@ -47,7 +47,6 @@ function(qt_internal_add_qml_module target) set(qml_module_single_args URI - TARGET_PATH VERSION PLUGIN_TARGET TYPEINFO @@ -106,14 +105,12 @@ function(qt_internal_add_qml_module target) ) set(QT_QML_OUTPUT_DIRECTORY "${QT_BUILD_DIR}/${INSTALL_QMLDIR}") - if(NOT arg_TARGET_PATH) - string(REPLACE "." "/" arg_TARGET_PATH ${arg_URI}) - endif() + string(REPLACE "." "/" target_path ${arg_URI}) if(NOT arg_OUTPUT_DIRECTORY) - set(arg_OUTPUT_DIRECTORY "${QT_QML_OUTPUT_DIRECTORY}/${arg_TARGET_PATH}") + set(arg_OUTPUT_DIRECTORY "${QT_QML_OUTPUT_DIRECTORY}/${target_path}") endif() if(NOT arg_INSTALL_DIRECTORY) - set(arg_INSTALL_DIRECTORY "${INSTALL_QMLDIR}/${arg_TARGET_PATH}") + set(arg_INSTALL_DIRECTORY "${INSTALL_QMLDIR}/${target_path}") endif() if(NOT arg_PLUGIN_TARGET) set(arg_PLUGIN_TARGET ${target}plugin) |