diff --git a/cmake/QtBuild.cmake b/cmake/QtBuild.cmake index 8392ab46c7..d08c93771f 100644 --- a/cmake/QtBuild.cmake +++ b/cmake/QtBuild.cmake @@ -2394,7 +2394,7 @@ function(qt_create_tracepoints name tracePointsFile) endfunction() function(qt_get_relative_resource_path_for_file output_alias file) - get_property(alias SOURCE ${file} PROPERTY alias) + get_property(alias SOURCE ${file} PROPERTY QT_RESOURCE_ALIAS) if (NOT alias) set(alias "${file}") endif() @@ -2566,7 +2566,7 @@ function(add_qt_resource target resourceName) # Unless otherwise specified, we should use the original file path # as alias. if (alias STREQUAL resource_file) - set_source_files_properties(${resource_file} PROPERTIES alias ${file}) + set_source_files_properties(${resource_file} PROPERTIES QT_RESOURCE_ALIAS ${file}) endif() file(TO_CMAKE_PATH ${resource_file} resource_file) list(APPEND resource_files ${resource_file}) diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 2e6936bc79..a972bfbc65 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -276,7 +276,7 @@ add_qt_resource(Gui qmake_webgradients PREFIX "/qgradient" BASE "painting" FILES # special case end set_source_files_properties("painting/../../3rdparty/icc/sRGB2014.icc" - PROPERTIES alias "sRGB2014.icc" + PROPERTIES QT_RESOURCE_ALIAS "sRGB2014.icc" ) add_qt_resource(Gui "qpdf" PREFIX diff --git a/src/plugins/platforms/windows/CMakeLists.txt b/src/plugins/platforms/windows/CMakeLists.txt index f4989649e2..3d0d37b7ed 100644 --- a/src/plugins/platforms/windows/CMakeLists.txt +++ b/src/plugins/platforms/windows/CMakeLists.txt @@ -70,7 +70,7 @@ add_qt_plugin(qwindows # Resources: set_source_files_properties("openglblacklists/default.json" - PROPERTIES alias "default.json") + PROPERTIES QT_RESOURCE_ALIAS "default.json") add_qt_resource(qwindows "openglblacklists" PREFIX "/qt-project.org/windows/openglblacklists" FILES openglblacklists/default.json) diff --git a/src/widgets/CMakeLists.txt b/src/widgets/CMakeLists.txt index a4c4ea16a3..f3abc16550 100644 --- a/src/widgets/CMakeLists.txt +++ b/src/widgets/CMakeLists.txt @@ -234,17 +234,17 @@ add_qt_resource(Widgets "qstyle" PREFIX "/qt-project.org/styles/commonstyle" BAS images/viewlist-16.png images/viewlist-32.png) set_source_files_properties("styles/images/closedock-down-macstyle-16.png" - PROPERTIES alias "images/closedock-down-16.png") + PROPERTIES QT_RESOURCE_ALIAS "images/closedock-down-16.png") set_source_files_properties("styles/images/closedock-macstyle-16.png" - PROPERTIES alias "images/closedock-16.png") + PROPERTIES QT_RESOURCE_ALIAS "images/closedock-16.png") set_source_files_properties("styles/images/dockdock-down-macstyle-16.png" - PROPERTIES alias "images/dockdock-down-16.png") + PROPERTIES QT_RESOURCE_ALIAS "images/dockdock-down-16.png") set_source_files_properties("styles/images/dockdock-macstyle-16.png" - PROPERTIES alias "images/dockdock-16.png") + PROPERTIES QT_RESOURCE_ALIAS "images/dockdock-16.png") set_source_files_properties("styles/images/toolbar-ext-macstyle.png" - PROPERTIES alias "images/toolbar-ext.png") + PROPERTIES QT_RESOURCE_ALIAS "images/toolbar-ext.png") set_source_files_properties("styles/images/toolbar-ext-macstyle@2x.png" - PROPERTIES alias "images/toolbar-ext@2x.png") + PROPERTIES QT_RESOURCE_ALIAS "images/toolbar-ext@2x.png") add_qt_resource(Widgets "qstyle1" PREFIX "/qt-project.org/styles/macstyle" BASE "styles" FILES images/closedock-down-macstyle-16.png images/closedock-macstyle-16.png diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt index 0bbb6ee81f..6bd76e0b9e 100644 --- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-cache/CMakeLists.txt @@ -15,16 +15,16 @@ add_qt_test(tst_qmimedatabase-cache # Resources: set_source_files_properties("../qml-again.xml" - PROPERTIES alias "qml-again.xml" + PROPERTIES QT_RESOURCE_ALIAS "qml-again.xml" ) set_source_files_properties("../test.qml" - PROPERTIES alias "test.qml" + PROPERTIES QT_RESOURCE_ALIAS "test.qml" ) set_source_files_properties("../text-x-objcsrc.xml" - PROPERTIES alias "text-x-objcsrc.xml" + PROPERTIES QT_RESOURCE_ALIAS "text-x-objcsrc.xml" ) set_source_files_properties("../yast2-metapackage-handler-mimetypes.xml" - PROPERTIES alias "yast2-metapackage-handler-mimetypes.xml" + PROPERTIES QT_RESOURCE_ALIAS "yast2-metapackage-handler-mimetypes.xml" ) add_qt_resource(tst_qmimedatabase-cache "testdata" PREFIX diff --git a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt index e8c5a9e9f4..d9491fd34b 100644 --- a/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt +++ b/tests/auto/corelib/mimetypes/qmimedatabase/qmimedatabase-xml/CMakeLists.txt @@ -15,16 +15,16 @@ add_qt_test(tst_qmimedatabase-xml # Resources: set_source_files_properties("../qml-again.xml" - PROPERTIES alias "qml-again.xml" + PROPERTIES QT_RESOURCE_ALIAS "qml-again.xml" ) set_source_files_properties("../test.qml" - PROPERTIES alias "test.qml" + PROPERTIES QT_RESOURCE_ALIAS "test.qml" ) set_source_files_properties("../text-x-objcsrc.xml" - PROPERTIES alias "text-x-objcsrc.xml" + PROPERTIES QT_RESOURCE_ALIAS "text-x-objcsrc.xml" ) set_source_files_properties("../yast2-metapackage-handler-mimetypes.xml" - PROPERTIES alias "yast2-metapackage-handler-mimetypes.xml" + PROPERTIES QT_RESOURCE_ALIAS "yast2-metapackage-handler-mimetypes.xml" ) add_qt_resource(tst_qmimedatabase-xml "testdata" PREFIX diff --git a/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt b/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt index ae7a4d0fe0..c92342c115 100644 --- a/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt +++ b/tests/auto/network/access/qnetworkreply/test/CMakeLists.txt @@ -36,7 +36,7 @@ add_qt_test(tst_qnetworkreply # Resources: set_source_files_properties("../resource" - PROPERTIES alias "resource" + PROPERTIES QT_RESOURCE_ALIAS "resource" ) add_qt_resource(tst_qnetworkreply "qnetworkreply" PREFIX diff --git a/tests/auto/opengl/qgl/CMakeLists.txt b/tests/auto/opengl/qgl/CMakeLists.txt index 5d1ef8bbbf..8d640a6f52 100644 --- a/tests/auto/opengl/qgl/CMakeLists.txt +++ b/tests/auto/opengl/qgl/CMakeLists.txt @@ -21,7 +21,7 @@ add_qt_test(tst_qgl # Resources: set_source_files_properties("../../gui/image/qpixmap/images/designer.png" - PROPERTIES alias "designer.png" + PROPERTIES QT_RESOURCE_ALIAS "designer.png" ) add_qt_resource(tst_qgl "qgl" PREFIX diff --git a/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt b/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt index 58cda26f0a..5edc1c79aa 100644 --- a/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt +++ b/tests/auto/widgets/dialogs/qfontdialog/CMakeLists.txt @@ -19,9 +19,9 @@ add_qt_test(tst_qfontdialog # Resources: set_source_files_properties("../../../shared/resources/test.ttf" - PROPERTIES alias "test.ttf") + PROPERTIES QT_RESOURCE_ALIAS "test.ttf") set_source_files_properties("../../../shared/resources/testfont.ttf" - PROPERTIES alias "testfont.ttf") + PROPERTIES QT_RESOURCE_ALIAS "testfont.ttf") add_qt_resource(tst_qfontdialog "testfonts" PREFIX "/" FILES ../../../shared/resources/test.ttf ../../../shared/resources/testfont.ttf) diff --git a/util/cmake/pro2cmake.py b/util/cmake/pro2cmake.py index b57a4beb1f..29fd885370 100755 --- a/util/cmake/pro2cmake.py +++ b/util/cmake/pro2cmake.py @@ -192,7 +192,7 @@ def write_add_qt_resource_call(target: str, resource_name: str, prefix: typing.O if alias: full_source = os.path.join(base_dir, source) output += 'set_source_files_properties("{}"\n' \ - ' PROPERTIES alias "{}"\n)\n'.format(full_source, alias) + ' PROPERTIES QT_RESOURCE_ALIAS "{}"\n)\n'.format(full_source, alias) # Quote file paths in case there are spaces. sorted_files = ['"{}"'.format(f) for f in sorted_files]