Details
-
Suggestion
-
Resolution: Unresolved
-
P3: Somewhat important
-
None
-
6.5.2
Description
With QMake, setting properties such as RC_ICONS, QMAKE_TARGET_PRODUCT, QMAKE_TARGET_COMPANY, and QMAKE_TARGET_COPYRIGHT would auto-generate an RC file for a Windows executable with the specified options. This could e.g. be used to set an application icon as documented.
With CMake this is no longer officially supported, and instead the documentation suggests to write your own RC file, which is cumbersome.
However, I found that using an internal Qt CMake macro it is still supported like this:
set_target_properties(${PROJECT_NAME} PROPERTIES QT_TARGET_COMPANY_NAME "..." QT_TARGET_DESCRIPTION "..." QT_TARGET_VERSION ... QT_TARGET_COPYRIGHT "..." QT_TARGET_PRODUCT_NAME "..." QT_TARGET_RC_ICONS "..." ) if(WIN32) _qt_internal_generate_win32_rc_file(${PROJECT_NAME}) endif()
This macro should be called automatically and the target options officially documented.
Attachments
Issue Links
- relates to
-
QTBUG-87618 Provide a way to generate Windows .rc files
- Reported