From 00598ca67e0c98aceafbdad2d67e66b165eb5660 Mon Sep 17 00:00:00 2001 From: Andy Nichols Date: Fri, 3 Sep 2021 08:20:34 +0200 Subject: Make sure to install designer files with non-prefixed builds It is not enough to just call qt_copy_or_install with a DESTINATION value prefixed with only ${INSTALL_QMLDIR}/ because for non-prefixed builds this will install relative to the directory this cmake file is in. Instead we have to combine ${QT_INSTALL_DIR} with the target path to make sure the final path is always correct. This pattern is used all over, so we muse do it as well. Change-Id: I327765dd61224ff070b07a48abc424fd7dadbb37 Reviewed-by: Laszlo Agocs (cherry picked from commit 76c3558507da722f7f523d36dc1cf61fdb376084) Reviewed-by: Qt Cherry-pick Bot --- src/chartsqml2/designer/CMakeLists.txt | 3 ++- src/chartsqml2/designer/default/CMakeLists.txt | 3 ++- src/chartsqml2/designer/images/CMakeLists.txt | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/src/chartsqml2/designer/CMakeLists.txt b/src/chartsqml2/designer/CMakeLists.txt index 42115e7b..b0f18096 100644 --- a/src/chartsqml2/designer/CMakeLists.txt +++ b/src/chartsqml2/designer/CMakeLists.txt @@ -1,8 +1,9 @@ +qt_path_join(destination ${QT_INSTALL_DIR} "${INSTALL_QMLDIR}/QtCharts/designer") qt_copy_or_install( FILES ChartViewSpecifics.qml qtcharts.metainfo - DESTINATION "${INSTALL_QMLDIR}/QtCharts/designer" + DESTINATION ${destination} ) add_subdirectory(default) diff --git a/src/chartsqml2/designer/default/CMakeLists.txt b/src/chartsqml2/designer/default/CMakeLists.txt index ccf366d8..dc2c2dda 100644 --- a/src/chartsqml2/designer/default/CMakeLists.txt +++ b/src/chartsqml2/designer/default/CMakeLists.txt @@ -1,3 +1,4 @@ +qt_path_join(destination ${QT_INSTALL_DIR} "${INSTALL_QMLDIR}/QtCharts/designer/default") qt_copy_or_install( FILES AreaSeries.qml @@ -16,5 +17,5 @@ qt_copy_or_install( PolarLineSeries.qml PolarScatterSeries.qml PolarSplineSeries.qml - DESTINATION "${INSTALL_QMLDIR}/QtCharts/designer/default" + DESTINATION "${destination}" ) diff --git a/src/chartsqml2/designer/images/CMakeLists.txt b/src/chartsqml2/designer/images/CMakeLists.txt index 0487f007..ec85d9c7 100644 --- a/src/chartsqml2/designer/images/CMakeLists.txt +++ b/src/chartsqml2/designer/images/CMakeLists.txt @@ -1,3 +1,4 @@ +qt_path_join(destination ${QT_INSTALL_DIR} "${INSTALL_QMLDIR}/QtCharts/designer/images") qt_copy_or_install( FILES areaseries-chart-icon.png @@ -32,5 +33,5 @@ qt_copy_or_install( scatterseries-polar-icon16.png splineseries-polar-icon.png splineseries-polar-icon16.png - DESTINATION "${INSTALL_QMLDIR}/QtCharts/designer/images" + DESTINATION "${destination}" ) -- cgit v1.2.3