CMake: Rename add_qt_gui_executable to qt_add_executable
Also adjust pro2cmake to use the new qt_add_executable name instead of add_qt_gui_executable. No compatibility functions provided this time, so we'll need to follow through all repos and regenerate all examples. Two reasons for not providing compaitibility functions: 1) We don't intend add_qt_gui_executable to be public API 2) A previous case with qtquickcontrols2 and qttools pointed out that making top-level builds work with cross-compatibility API is not simple. So just go ahead and regenerate everything. Task-number: QTBUG-87661 Change-Id: I2f228827b786ae03bf7e1bf3908ea02a8794ed52 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
This commit is contained in:
parent
407e171b40
commit
c3fee0d984
@ -426,7 +426,7 @@ set(_Qt6_COMPONENT_PATH "${CMAKE_CURRENT_LIST_DIR}/..")
|
|||||||
# It's signature and behavior might change.
|
# It's signature and behavior might change.
|
||||||
#
|
#
|
||||||
# Wrapper function that adds an executable with some Qt specific behavior.
|
# Wrapper function that adds an executable with some Qt specific behavior.
|
||||||
function(add_qt_gui_executable target)
|
function(qt6_add_executable target)
|
||||||
if(ANDROID)
|
if(ANDROID)
|
||||||
add_library("${target}" MODULE ${ARGN})
|
add_library("${target}" MODULE ${ARGN})
|
||||||
# On our qmake builds we do don't compile the executables with
|
# On our qmake builds we do don't compile the executables with
|
||||||
@ -456,6 +456,13 @@ function(add_qt_gui_executable target)
|
|||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
if(NOT QT_NO_CREATE_VERSIONLESS_FUNCTIONS)
|
||||||
|
function(qt_add_executable)
|
||||||
|
qt6_add_executable(${ARGV})
|
||||||
|
endfunction()
|
||||||
|
endif()
|
||||||
|
|
||||||
|
|
||||||
function(_qt_get_plugin_name_with_version target out_var)
|
function(_qt_get_plugin_name_with_version target out_var)
|
||||||
string(REGEX REPLACE "^Qt::(.+)" "Qt${QT_DEFAULT_MAJOR_VERSION}::\\1"
|
string(REGEX REPLACE "^Qt::(.+)" "Qt${QT_DEFAULT_MAJOR_VERSION}::\\1"
|
||||||
qt_plugin_with_version "${target}")
|
qt_plugin_with_version "${target}")
|
||||||
|
@ -3719,7 +3719,7 @@ def write_example(
|
|||||||
add_target += f"target_sources({binary_name} PRIVATE"
|
add_target += f"target_sources({binary_name} PRIVATE"
|
||||||
|
|
||||||
else:
|
else:
|
||||||
add_target = f'add_{"qt_gui_" if gui else ""}executable({binary_name}'
|
add_target = f'qt_add_executable({binary_name}'
|
||||||
|
|
||||||
write_all_source_file_lists(cm_fh, scope, add_target, indent=0)
|
write_all_source_file_lists(cm_fh, scope, add_target, indent=0)
|
||||||
cm_fh.write(")\n")
|
cm_fh.write(")\n")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user