summaryrefslogtreecommitdiffstats
path: root/src/corelib/Qt5CoreMacros.cmake
diff options
context:
space:
mode:
authorStephen Kelly <stephen.kelly@kdab.com>2012-08-02 10:07:19 +0200
committerQt by Nokia <qt-info@nokia.com>2012-08-10 21:57:47 +0200
commit79a7e6f23b9412d281f2c4957be39b656f78fe1e (patch)
treec443f31b6c86811f88d2eddbec8cc79a0bbbc489 /src/corelib/Qt5CoreMacros.cmake
parent06ca4e38cf52e5c5ddad8497fa72d2d28d81b2a9 (diff)
Require CMake 2.8.9 for the qt5_use_modules function.
The newer CMake version has the POSITION_INDEPENDENT_CODE property which is what we need here. The CMake 2.8.8 implementation uses awkward and incomplete string manipulation which I don't want to maintain for any amount of time when Qt 5.0 is released. Change-Id: If7ace9c6925ccdbf800f1863fa2368e55fa44d7f Reviewed-by: Brad King <brad.king@kitware.com> Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Diffstat (limited to 'src/corelib/Qt5CoreMacros.cmake')
-rw-r--r--src/corelib/Qt5CoreMacros.cmake15
1 files changed, 1 insertions, 14 deletions
diff --git a/src/corelib/Qt5CoreMacros.cmake b/src/corelib/Qt5CoreMacros.cmake
index 7cccefd014..608c9be6b9 100644
--- a/src/corelib/Qt5CoreMacros.cmake
+++ b/src/corelib/Qt5CoreMacros.cmake
@@ -212,7 +212,7 @@ function(QT5_ADD_RESOURCES outfiles )
endfunction()
-if (NOT CMAKE_VERSION VERSION_LESS 2.8.8)
+if (NOT CMAKE_VERSION VERSION_LESS 2.8.9)
function(qt5_use_modules _target _link_type)
if ("${_link_type}" STREQUAL "LINK_PUBLIC" OR "${_link_type}" STREQUAL "LINK_PRIVATE" )
set(modules ${ARGN})
@@ -233,19 +233,6 @@ if (NOT CMAKE_VERSION VERSION_LESS 2.8.8)
if (Qt5_POSITION_INDEPENDENT_CODE)
set_property(TARGET ${_target} PROPERTY POSITION_INDEPENDENT_CODE ${Qt5_POSITION_INDEPENDENT_CODE})
- if (CMAKE_VERSION VERSION_LESS 2.8.9)
- # We can't just append to the COMPILE_FLAGS property. That creats a ';' separated list
- # which breaks the compile commmand line.
- # Ensure non-duplication here manually instead.
- get_property(_target_type TARGET ${_target} PROPERTY TYPE)
- if ("${_target_type}" STREQUAL "EXECUTABLE" AND Qt5${_module}_EXECUTABLE_COMPILE_FLAGS)
- get_target_property(_flags ${_target} COMPILE_FLAGS)
- string(FIND "${_flags}" "${Qt5${_module}_EXECUTABLE_COMPILE_FLAGS}" _find_result)
- if (NOT _find_result)
- set_target_properties(${_target} PROPERTIES COMPILE_FLAGS "${_flags} ${Qt5${_module}_EXECUTABLE_COMPILE_FLAGS}")
- endif()
- endif()
- endif()
endif()
endforeach()
endfunction()