CMake: Add more entries for rc files
As what we did for QMake. Amends commit 317383217baa280b7e7401a5adc4ce976320e272 Change-Id: Iab3b755193b5483362896da20a03fe2d59f37192 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
This commit is contained in:
parent
fc1e5d9877
commit
745fae0dc1
@ -812,6 +812,10 @@ endif()
|
|||||||
# QT_TARGET_VERSION: RC File and Product Version
|
# QT_TARGET_VERSION: RC File and Product Version
|
||||||
# QT_TARGET_COPYRIGHT: RC LegalCopyright
|
# QT_TARGET_COPYRIGHT: RC LegalCopyright
|
||||||
# QT_TARGET_PRODUCT_NAME: RC ProductName
|
# QT_TARGET_PRODUCT_NAME: RC ProductName
|
||||||
|
# QT_TARGET_COMMENTS: RC Comments
|
||||||
|
# QT_TARGET_ORIGINAL_FILENAME: RC Original FileName
|
||||||
|
# QT_TARGET_TRADEMARKS: RC LegalTrademarks
|
||||||
|
# QT_TARGET_INTERNALNAME: RC InternalName
|
||||||
# QT_TARGET_RC_ICONS: List of paths to icon files
|
# QT_TARGET_RC_ICONS: List of paths to icon files
|
||||||
#
|
#
|
||||||
# If you do not wish to auto-generate rc files, it's possible to provide your
|
# If you do not wish to auto-generate rc files, it's possible to provide your
|
||||||
@ -871,6 +875,18 @@ function(qt6_generate_win32_rc_file target)
|
|||||||
set(product_name "${target}")
|
set(product_name "${target}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
set(comments "")
|
||||||
|
get_target_property(target_comments ${target} QT_TARGET_COMMENTS)
|
||||||
|
if (target_comments)
|
||||||
|
set(comments "${target_comments}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(legal_trademarks "")
|
||||||
|
get_target_property(target_trademarks ${target} QT_TARGET_TRADEMARKS)
|
||||||
|
if (target_trademarks)
|
||||||
|
set(legal_trademarks "${target_trademarks}")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(product_version "")
|
set(product_version "")
|
||||||
if (target_version)
|
if (target_version)
|
||||||
if(target_version MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+")
|
if(target_version MATCHES "[0-9]+\\.[0-9]+\\.[0-9]+\\.[0-9]+")
|
||||||
@ -890,9 +906,20 @@ function(qt6_generate_win32_rc_file target)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(file_version "${product_version}")
|
set(file_version "${product_version}")
|
||||||
set(original_file_name "$<TARGET_FILE_NAME:${target}>")
|
|
||||||
string(REPLACE "." "," version_comma ${product_version})
|
string(REPLACE "." "," version_comma ${product_version})
|
||||||
|
|
||||||
|
set(original_file_name "$<TARGET_FILE_NAME:${target}>")
|
||||||
|
get_target_property(target_original_file_name ${target} QT_TARGET_ORIGINAL_FILENAME)
|
||||||
|
if (target_original_file_name)
|
||||||
|
set(original_file_name "${target_original_file_name}")
|
||||||
|
endif()
|
||||||
|
|
||||||
|
set(internal_name "")
|
||||||
|
get_target_property(target_internal_name ${target} QT_TARGET_INTERNALNAME)
|
||||||
|
if (target_internal_name)
|
||||||
|
set(internal_name "${target_internal_name}")
|
||||||
|
endif()
|
||||||
|
|
||||||
set(icons "")
|
set(icons "")
|
||||||
get_target_property(target_icons ${target} QT_TARGET_RC_ICONS)
|
get_target_property(target_icons ${target} QT_TARGET_RC_ICONS)
|
||||||
if (target_icons)
|
if (target_icons)
|
||||||
@ -929,6 +956,9 @@ BEGIN
|
|||||||
VALUE \"OriginalFilename\", \"${original_file_name}\"
|
VALUE \"OriginalFilename\", \"${original_file_name}\"
|
||||||
VALUE \"ProductName\", \"${product_name}\"
|
VALUE \"ProductName\", \"${product_name}\"
|
||||||
VALUE \"ProductVersion\", \"${product_version}\"
|
VALUE \"ProductVersion\", \"${product_version}\"
|
||||||
|
VALUE \"Comments\", \"${comments}\"
|
||||||
|
VALUE \"LegalTrademarks\", \"${legal_trademarks}\"
|
||||||
|
VALUE \"InternalName\", \"${internal_name}\"
|
||||||
END
|
END
|
||||||
END
|
END
|
||||||
BLOCK \"VarFileInfo\"
|
BLOCK \"VarFileInfo\"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user