summaryrefslogtreecommitdiffstats
path: root/Modules/Qt4Macros.cmake
diff options
context:
space:
mode:
authorStephen Kelly <steveire@gmail.com>2013-07-04 08:00:27 (GMT)
committerStephen Kelly <steveire@gmail.com>2013-07-14 08:05:04 (GMT)
commitcb7f32f5b861fe115fa71f64500a5cbb0b643f1b (patch)
tree4decc25017cca2777f4f3356d3a355354bec451a /Modules/Qt4Macros.cmake
parentc64326bc0b2df30060a475e147c136ae5e7234ae (diff)
downloadCMake-cb7f32f5b861fe115fa71f64500a5cbb0b643f1b.zip
CMake-cb7f32f5b861fe115fa71f64500a5cbb0b643f1b.tar.gz
CMake-cb7f32f5b861fe115fa71f64500a5cbb0b643f1b.tar.bz2
Mark qt4_use_modules and qt4_automoc as obsolete.
The QT_QMAKE_EXECUTABLE has to be passed through the cmake calls because the executable may not be in the PATH.
Diffstat (limited to 'Modules/Qt4Macros.cmake')
-rw-r--r--Modules/Qt4Macros.cmake22
1 files changed, 22 insertions, 0 deletions
diff --git a/Modules/Qt4Macros.cmake b/Modules/Qt4Macros.cmake
index a0b2e31..5e13b59 100644
--- a/Modules/Qt4Macros.cmake
+++ b/Modules/Qt4Macros.cmake
@@ -357,6 +357,17 @@ endmacro()
macro(QT4_AUTOMOC)
+ 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 qt4_automoc macro is obsolete. Use the CMAKE_AUTOMOC feature instead.")
+ endif()
+ endif()
QT4_GET_MOC_FLAGS(_moc_INCS)
set(_matching_FILES )
@@ -467,6 +478,17 @@ macro(QT4_ADD_TRANSLATION _qm_files)
endmacro()
function(qt4_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 qt4_use_modules function is obsolete. Use target_link_libraries with IMPORTED targets instead.")
+ endif()
+ endif()
if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE")
set(modules ${ARGN})
set(link_type ${_link_type})