summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2013-07-29 13:47:15 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-31 10:44:49 +0200
commitd9ea4bb1441534cfb9253303ac258951dfcc4d9e (patch)
treef1fbeb71797cc781e09a8611ea2f86d776144f00
parent87a30db468b187c9c667feefdb31a63028ee9fad (diff)
Mark qt5_use_modules as obsolete.
Forward-port of cb7f32f5b861fe115fa71f64500a5cbb0b643f1b (Mark qt4_use_modules and qt4_automoc as obsolete., 2013-07-04) from cmake.git. Change-Id: I0c24408ef06bc93eb0e55108cf4eab2f8cbd19cb Reviewed-by: Jerome Pasion <jerome.pasion@digia.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
-rw-r--r--src/corelib/Qt5CoreMacros.cmake12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
index f549fead59..6630885257 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -219,6 +219,18 @@ set(_Qt5_COMPONENT_PATH "${CMAKE_CURRENT_LIST_DIR}/..")
if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
macro(qt5_use_modules _target _link_type)
+ if(NOT CMAKE_MINIMUM_REQUIRED_VERSION VERSION_LESS 2.8.11)
+ if(CMAKE_WARN_DEPRECATED)
+ set(messageType WARNING)
+ endif()
+ if(CMAKE_ERROR_DEPRECATED)
+ set(messageType FATAL_ERROR)
+ endif()
+ if(messageType)
+ message(${messageType} "The qt5_use_modules macro is obsolete. Use target_link_libraries with IMPORTED targets instead.")
+ endif()
+ endif()
+
if (NOT TARGET ${_target})
message(FATAL_ERROR "The first argument to qt5_use_modules must be an existing target.")
endif()