CMake: Remove conditions for CMake < 3.1

We don't support anything older than CMake 3.1

Change-Id: I5425a2fddfe5416a6a127a81da669fb37ac4d81c
Reviewed-by: Liang Qi <liang.qi@qt.io>
This commit is contained in:
Kai Koehne 2019-11-08 17:24:30 +01:00 committed by Liang Qi
parent 25bcd8f08b
commit fea316cbe7

View File

@ -343,9 +343,7 @@ endfunction()
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)
macro(qt5_use_modules _target _link_type)
if(CMAKE_WARN_DEPRECATED)
set(messageType WARNING)
endif()
@ -355,7 +353,6 @@ if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
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.")
@ -385,14 +382,12 @@ if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_RELWITHDEBINFO QT_NO_DEBUG)
set_property(TARGET ${_target} APPEND PROPERTY COMPILE_DEFINITIONS_MINSIZEREL QT_NO_DEBUG)
if (Qt5_POSITION_INDEPENDENT_CODE
AND (CMAKE_VERSION VERSION_GREATER_EQUAL 2.8.12
AND (NOT CMAKE_CXX_COMPILER_ID STREQUAL "GNU"
OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0)))
OR CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0))
set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt5_POSITION_INDEPENDENT_CODE})
endif()
endforeach()
endmacro()
endif()
endmacro()
function(QT5_IMPORT_PLUGINS TARGET_NAME)
set(_doing "")