diff options
author | Brad King <brad.king@kitware.com> | 2013-07-16 17:59:22 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-07-16 17:59:22 (GMT) |
commit | 9c119b829dc0189c1ba5c4ae928b671340c7a085 (patch) | |
tree | 27c74222e61240652b71cc6121c83be75b647d5f /Modules | |
parent | 3573a94d729bb15d2a7c212a29ddbe012acd412b (diff) | |
parent | cb7f32f5b861fe115fa71f64500a5cbb0b643f1b (diff) | |
download | CMake-9c119b829dc0189c1ba5c4ae928b671340c7a085.zip CMake-9c119b829dc0189c1ba5c4ae928b671340c7a085.tar.gz CMake-9c119b829dc0189c1ba5c4ae928b671340c7a085.tar.bz2 |
Merge topic 'obsolete-qt4-macros'
cb7f32f Mark qt4_use_modules and qt4_automoc as obsolete.
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/FindQt4.cmake | 2 | ||||
-rw-r--r-- | Modules/Qt4Macros.cmake | 22 |
2 files changed, 24 insertions, 0 deletions
diff --git a/Modules/FindQt4.cmake b/Modules/FindQt4.cmake index 8ce1934..7b37e1e 100644 --- a/Modules/FindQt4.cmake +++ b/Modules/FindQt4.cmake @@ -100,6 +100,7 @@ # because you need a custom filename for the moc file or something similar. # # macro QT4_AUTOMOC(sourcefile1 sourcefile2 ... ) +# The qt4_automoc macro is obsolete. Use the CMAKE_AUTOMOC feature instead. # This macro is still experimental. # It can be used to have moc automatically handled. # So if you have the files foo.h and foo.cpp, and in foo.h a @@ -174,6 +175,7 @@ # must exist and are not updated in any way. # # function QT4_USE_MODULES( target [link_type] modules...) +# This function is obsolete. Use target_link_libraries with IMPORTED targets instead. # Make <target> use the <modules> from Qt. Using a Qt module means # to link to the library, add the relevant include directories for the module, # and add the relevant compiler defines for using the module. 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}) |