diff options
author | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-10-15 17:58:15 +0200 |
---|---|---|
committer | Alexandru Croitor <alexandru.croitor@qt.io> | 2020-10-19 11:51:44 +0200 |
commit | c3fee0d984e59cee3ab6d069011015dd850be98f (patch) | |
tree | e761c7af1e6e3ceeeae2b36e43681f2c707da43f /src/corelib | |
parent | 407e171b40c3be3036ef71227d43c49f0b8d5788 (diff) |
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>
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/Qt6CoreMacros.cmake | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/corelib/Qt6CoreMacros.cmake b/src/corelib/Qt6CoreMacros.cmake index 7b901b3c09..77c3128d52 100644 --- a/src/corelib/Qt6CoreMacros.cmake +++ b/src/corelib/Qt6CoreMacros.cmake @@ -426,7 +426,7 @@ set(_Qt6_COMPONENT_PATH "${CMAKE_CURRENT_LIST_DIR}/..") # It's signature and behavior might change. # # Wrapper function that adds an executable with some Qt specific behavior. -function(add_qt_gui_executable target) +function(qt6_add_executable target) if(ANDROID) add_library("${target}" MODULE ${ARGN}) # On our qmake builds we do don't compile the executables with @@ -456,6 +456,13 @@ function(add_qt_gui_executable target) endif() 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) string(REGEX REPLACE "^Qt::(.+)" "Qt${QT_DEFAULT_MAJOR_VERSION}::\\1" qt_plugin_with_version "${target}") |