Rename alias property on source files to QT_RESOURCE_ALIAS
Rename the alias property used by add_qt_resource() to QT_RESOURCE_ALIAS to match property naming conventions. Change-Id: I97b12b0b794e158f03dabeed5ec23a3b7d56cfbb Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
8630c5ac7e
commit
7fda42ef9a
@ -2394,7 +2394,7 @@ function(qt_create_tracepoints name tracePointsFile)
|
|||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
function(qt_get_relative_resource_path_for_file output_alias file)
|
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)
|
if (NOT alias)
|
||||||
set(alias "${file}")
|
set(alias "${file}")
|
||||||
endif()
|
endif()
|
||||||
@ -2566,7 +2566,7 @@ function(add_qt_resource target resourceName)
|
|||||||
# Unless otherwise specified, we should use the original file path
|
# Unless otherwise specified, we should use the original file path
|
||||||
# as alias.
|
# as alias.
|
||||||
if (alias STREQUAL resource_file)
|
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()
|
endif()
|
||||||
file(TO_CMAKE_PATH ${resource_file} resource_file)
|
file(TO_CMAKE_PATH ${resource_file} resource_file)
|
||||||
list(APPEND resource_files ${resource_file})
|
list(APPEND resource_files ${resource_file})
|
||||||
|
@ -276,7 +276,7 @@ add_qt_resource(Gui qmake_webgradients PREFIX "/qgradient" BASE "painting" FILES
|
|||||||
# special case end
|
# special case end
|
||||||
|
|
||||||
set_source_files_properties("painting/../../3rdparty/icc/sRGB2014.icc"
|
set_source_files_properties("painting/../../3rdparty/icc/sRGB2014.icc"
|
||||||
PROPERTIES alias "sRGB2014.icc"
|
PROPERTIES QT_RESOURCE_ALIAS "sRGB2014.icc"
|
||||||
)
|
)
|
||||||
add_qt_resource(Gui "qpdf"
|
add_qt_resource(Gui "qpdf"
|
||||||
PREFIX
|
PREFIX
|
||||||
|
@ -70,7 +70,7 @@ add_qt_plugin(qwindows
|
|||||||
|
|
||||||
# Resources:
|
# Resources:
|
||||||
set_source_files_properties("openglblacklists/default.json"
|
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
|
add_qt_resource(qwindows "openglblacklists" PREFIX "/qt-project.org/windows/openglblacklists" FILES
|
||||||
openglblacklists/default.json)
|
openglblacklists/default.json)
|
||||||
|
|
||||||
|
@ -234,17 +234,17 @@ add_qt_resource(Widgets "qstyle" PREFIX "/qt-project.org/styles/commonstyle" BAS
|
|||||||
images/viewlist-16.png
|
images/viewlist-16.png
|
||||||
images/viewlist-32.png)
|
images/viewlist-32.png)
|
||||||
set_source_files_properties("styles/images/closedock-down-macstyle-16.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"
|
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"
|
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"
|
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"
|
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"
|
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
|
add_qt_resource(Widgets "qstyle1" PREFIX "/qt-project.org/styles/macstyle" BASE "styles" FILES
|
||||||
images/closedock-down-macstyle-16.png
|
images/closedock-down-macstyle-16.png
|
||||||
images/closedock-macstyle-16.png
|
images/closedock-macstyle-16.png
|
||||||
|
@ -15,16 +15,16 @@ add_qt_test(tst_qmimedatabase-cache
|
|||||||
|
|
||||||
# Resources:
|
# Resources:
|
||||||
set_source_files_properties("../qml-again.xml"
|
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"
|
set_source_files_properties("../test.qml"
|
||||||
PROPERTIES alias "test.qml"
|
PROPERTIES QT_RESOURCE_ALIAS "test.qml"
|
||||||
)
|
)
|
||||||
set_source_files_properties("../text-x-objcsrc.xml"
|
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"
|
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"
|
add_qt_resource(tst_qmimedatabase-cache "testdata"
|
||||||
PREFIX
|
PREFIX
|
||||||
|
@ -15,16 +15,16 @@ add_qt_test(tst_qmimedatabase-xml
|
|||||||
|
|
||||||
# Resources:
|
# Resources:
|
||||||
set_source_files_properties("../qml-again.xml"
|
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"
|
set_source_files_properties("../test.qml"
|
||||||
PROPERTIES alias "test.qml"
|
PROPERTIES QT_RESOURCE_ALIAS "test.qml"
|
||||||
)
|
)
|
||||||
set_source_files_properties("../text-x-objcsrc.xml"
|
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"
|
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"
|
add_qt_resource(tst_qmimedatabase-xml "testdata"
|
||||||
PREFIX
|
PREFIX
|
||||||
|
@ -36,7 +36,7 @@ add_qt_test(tst_qnetworkreply
|
|||||||
|
|
||||||
# Resources:
|
# Resources:
|
||||||
set_source_files_properties("../resource"
|
set_source_files_properties("../resource"
|
||||||
PROPERTIES alias "resource"
|
PROPERTIES QT_RESOURCE_ALIAS "resource"
|
||||||
)
|
)
|
||||||
add_qt_resource(tst_qnetworkreply "qnetworkreply"
|
add_qt_resource(tst_qnetworkreply "qnetworkreply"
|
||||||
PREFIX
|
PREFIX
|
||||||
|
@ -21,7 +21,7 @@ add_qt_test(tst_qgl
|
|||||||
|
|
||||||
# Resources:
|
# Resources:
|
||||||
set_source_files_properties("../../gui/image/qpixmap/images/designer.png"
|
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"
|
add_qt_resource(tst_qgl "qgl"
|
||||||
PREFIX
|
PREFIX
|
||||||
|
@ -19,9 +19,9 @@ add_qt_test(tst_qfontdialog
|
|||||||
|
|
||||||
# Resources:
|
# Resources:
|
||||||
set_source_files_properties("../../../shared/resources/test.ttf"
|
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"
|
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
|
add_qt_resource(tst_qfontdialog "testfonts" PREFIX "/" FILES
|
||||||
../../../shared/resources/test.ttf
|
../../../shared/resources/test.ttf
|
||||||
../../../shared/resources/testfont.ttf)
|
../../../shared/resources/testfont.ttf)
|
||||||
|
@ -192,7 +192,7 @@ def write_add_qt_resource_call(target: str, resource_name: str, prefix: typing.O
|
|||||||
if alias:
|
if alias:
|
||||||
full_source = os.path.join(base_dir, source)
|
full_source = os.path.join(base_dir, source)
|
||||||
output += 'set_source_files_properties("{}"\n' \
|
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.
|
# Quote file paths in case there are spaces.
|
||||||
sorted_files = ['"{}"'.format(f) for f in sorted_files]
|
sorted_files = ['"{}"'.format(f) for f in sorted_files]
|
||||||
|
Loading…
Reference in New Issue
Block a user