From f9817dda5576db8709750cea7d799b1e5ea40ca0 Mon Sep 17 00:00:00 2001 From: Stephen Kelly Date: Wed, 13 Jun 2012 22:26:30 +0200 Subject: Use the POSITION_INDEPENDENT_CODE property on targets using Qt. This property is only set if Qt is configured with -reduce-relocations (which is the default). Change-Id: If2f0ab92448f03bbc3f7c828d3bca60107229072 Reviewed-by: Brad King Reviewed-by: Stephen Kelly --- src/corelib/Qt5CoreConfigExtras.cmake.in | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/corelib/Qt5CoreConfigExtras.cmake.in') diff --git a/src/corelib/Qt5CoreConfigExtras.cmake.in b/src/corelib/Qt5CoreConfigExtras.cmake.in index cd330f5d34..246aa8376e 100644 --- a/src/corelib/Qt5CoreConfigExtras.cmake.in +++ b/src/corelib/Qt5CoreConfigExtras.cmake.in @@ -18,6 +18,10 @@ list(APPEND Qt5Core_INCLUDE_DIRS \"$${CMAKE_DATA_DIR}mkspecs/default\") !!ENDIF !!IF !isEmpty(CMAKE_ADD_FPIE_FLAGS) +# Targets using Qt need to use the POSITION_INDEPENDENT_CODE property. The +# Qt5_POSITION_INDEPENDENT_CODE variable is used in the # qt5_use_module +# macro to add it. +set(Qt5_POSITION_INDEPENDENT_CODE True) set(Qt5Core_EXECUTABLE_COMPILE_FLAGS \"-fPIE\") !!ENDIF -- cgit v1.2.3