summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBen Boeckel <ben.boeckel@kitware.com>2017-05-24 09:21:09 -0400
committerJoerg Bornemann <joerg.bornemann@qt.io>2019-11-26 20:17:07 +0100
commitd5608ca43756ed62678e60215da71827dd26a900 (patch)
treeda35edc43cf8ce11af6b941eedd7f169b8a63cd4 /src
parentcd3585ab159c3d0614f418fd148b7cea77ea6d12 (diff)
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>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/Qt5CoreMacros.cmake2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
index 17cc19fc4e..84c75401b1 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -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})