Qt5CoreMacros: properly check the CMake version
The POSITION_INDEPENDENT_CODE property was introduced in 2.8.12, so use it in versions newer than 2.8.12. Fixes: QTBUG-79671 Change-Id: If7f023e80964f2e47edc35eee617b51aeecbf032 Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This commit is contained in:
parent
cd3585ab15
commit
d5608ca437
@ -385,7 +385,7 @@ 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_LESS 2.8.12
|
||||
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)))
|
||||
set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt5_POSITION_INDEPENDENT_CODE})
|
||||
|
Loading…
Reference in New Issue
Block a user