From b83fc9f41ac52e7912ad977164b92418ace6e461 Mon Sep 17 00:00:00 2001 From: Ivan Solovev Date: Fri, 26 Aug 2022 17:28:30 +0200 Subject: 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 --- cmake/QtAppHelpers.cmake | 3 +++ cmake/QtToolHelpers.cmake | 3 +++ 2 files changed, 6 insertions(+) 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} -- cgit v1.2.3