diff options
author | Simon Hausmann <simon.hausmann@theqtcompany.com> | 2015-05-27 10:04:17 +0200 |
---|---|---|
committer | Jani Heikkinen <jani.heikkinen@theqtcompany.com> | 2015-05-27 11:25:54 +0000 |
commit | 9e6aabfd68771f2fba9288f130dc7db4ace040bf (patch) | |
tree | 5662e0e31c1d94da13a88159c3ce5e839f85f04e /doc/src/snippets/cmake | |
parent | d140fdcbee0f48aeb435e71bc92698f5acc72fe5 (diff) | |
download | qtdoc-5.4.2.tar.gz |
As a follow-up to qtbase commit 083c9269ed73e8771e1dbe10812696b45b7389f3, cmake
versions older than 2.8.12 require now the use of
Qt5<Module>_EXECUTABLE_COMPILE_FLAGS and the use of cmake's
POSITION_INDEPENDENT_CODE feature is not wanted anymore, as it adds -fPIE to
the build flags, which may override -fPIC and thus cause a build issue when
including qglobal.h.
Change-Id: I4dd6e2ea64f5d8ca8a87f874322bc1b1f8ff5392
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Diffstat (limited to 'doc/src/snippets/cmake')
-rw-r--r-- | doc/src/snippets/cmake/CMakeLists.pro | 22 |
1 files changed, 1 insertions, 21 deletions
diff --git a/doc/src/snippets/cmake/CMakeLists.pro b/doc/src/snippets/cmake/CMakeLists.pro index 5600e870..efdf4226 100644 --- a/doc/src/snippets/cmake/CMakeLists.pro +++ b/doc/src/snippets/cmake/CMakeLists.pro @@ -73,28 +73,8 @@ target_link_libraries(helloworld Qt5::Widgets) #! [4] #! [5] -find_package(Qt5Core) - -add_executable(exe1 ${exe1_SRCS}) -# Set the POSITION_INDEPENDENT_CODE property for the exe1 target... -set_target_properties(exe1 PROPERTIES POSITION_INDEPENDENT_CODE ON) - -# Or set it globally for all targets: -set(CMAKE_POSITION_INDEPENDENT_CODE ON) -add_executable(exe2 ${exe2_SRCS}) - -add_executable(exe3 ${exe3_SRCS}) -#! [5] - -#! [6] -if (Qt5_POSITION_INDEPENDENT_CODE) - set(CMAKE_POSITION_INDEPENDENT_CODE ON) -endif() -#! [6] - -#! [7] foreach(plugin ${Qt5Network_PLUGINS}) get_target_property(_loc ${plugin} LOCATION) message("Plugin ${plugin} is at location ${_loc}") endforeach() -#! [7] +#! [5] |