File 0001-create-apps-with-version.cmake of Package mingw32-qt6-base
--- qtbase-everywhere-src-6.5.1/cmake/QtAppHelpers.cmake.orig 2023-07-26 11:04:59.342894227 +0200
+++ qtbase-everywhere-src-6.5.1/cmake/QtAppHelpers.cmake 2023-07-26 11:11:14.585822199 +0200
@@ -80,6 +80,14 @@
_qt_internal_apply_strict_cpp("${target}")
qt_internal_adjust_main_config_runtime_output_dir("${target}" "${output_directory}")
+ qt_app_target_to_name(name "${target}")
+ if (NOT target STREQUAL name)
+ set_target_properties("${target}" PROPERTIES
+ OUTPUT_NAME ${name}
+ EXPORT_NAME ${name}
+ )
+ endif()
+
# To mimic the default behaviors of qt_app.prf, we by default enable GUI Windows applications,
# but don't enable macOS bundles.
# Bundles are enabled in a separate set_target_properties call if an Info.plist file
@@ -100,6 +108,17 @@
qt_add_list_file_finalizer(qt_internal_finalize_app ${target})
endfunction()
+# Returns the tool name for a given tool target.
+# This is the inverse of qt_get_tool_target_name.
+function(qt_app_target_to_name out_var target)
+ set(name ${target})
+ if(QT_APP_NAMES_WITH_VERSION)
+ set(${out_var} ${name}${PROJECT_VERSION_MAJOR} PARENT_SCOPE)
+ else()
+ set(${out_var} ${name} PARENT_SCOPE)
+ endif()
+endfunction()
+
function(qt_internal_get_title_case value out_var)
if(NOT value)
set(${out_var} "" PARENT_SCOPE)