summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIvan Solovev <ivan.solovev@qt.io>2022-08-26 17:28:30 +0200
committerIvan Solovev <ivan.solovev@qt.io>2022-09-07 19:51:38 +0200
commitb83fc9f41ac52e7912ad977164b92418ace6e461 (patch)
tree32197082b9514d56d6d88f67e2ae7cf0d6125fcd
parentd1175e20cf61fa37cff03c76d4714cc8fdbd7b8d (diff)
CMake: propagate deprecations definitions to tools and apps
If Qt itself is built without the deprecated APIs, so should be the tools and apps. This patch makes sure that the specified QT_DISABLE_DEPRECATED_UP_TO and QT_WARN_DEPRECATED_UP_TO values are correctly used in the internal tools and apps. Fixes: QTBUG-105102 Change-Id: I7a51bddbd839c7b71efa0bff8ec959df64c53b82 Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
-rw-r--r--cmake/QtAppHelpers.cmake3
-rw-r--r--cmake/QtToolHelpers.cmake3
2 files changed, 6 insertions, 0 deletions
diff --git a/cmake/QtAppHelpers.cmake b/cmake/QtAppHelpers.cmake
index 80e0c8f318..9048039c83 100644
--- a/cmake/QtAppHelpers.cmake
+++ b/cmake/QtAppHelpers.cmake
@@ -35,6 +35,8 @@ function(qt_internal_add_app target)
"a future Qt version. Use the LIBRARIES option instead.")
endif()
+ qt_internal_library_deprecation_level(deprecation_define)
+
qt_internal_add_executable("${target}"
QT_APP
DELAY_RC
@@ -48,6 +50,7 @@ function(qt_internal_add_app target)
${arg_INCLUDE_DIRECTORIES}
DEFINES
${arg_DEFINES}
+ ${deprecation_define}
LIBRARIES
${arg_LIBRARIES}
${arg_PUBLIC_LIBRARIES}
diff --git a/cmake/QtToolHelpers.cmake b/cmake/QtToolHelpers.cmake
index cedf4e30d1..7b6aa69687 100644
--- a/cmake/QtToolHelpers.cmake
+++ b/cmake/QtToolHelpers.cmake
@@ -217,6 +217,8 @@ function(qt_internal_add_tool target_name)
"removed in a future Qt version. Use the LIBRARIES option instead.")
endif()
+ qt_internal_library_deprecation_level(deprecation_define)
+
qt_internal_add_executable("${target_name}"
OUTPUT_DIRECTORY "${output_dir}"
${exceptions}
@@ -227,6 +229,7 @@ function(qt_internal_add_tool target_name)
DEFINES
QT_USE_QSTRINGBUILDER
${arg_DEFINES}
+ ${deprecation_define}
${corelib}
LIBRARIES
${arg_LIBRARIES}