cmake: Check for PIE support

This commit is contained in:
Andreas Schneider 2021-10-20 12:57:29 +02:00 committed by Jonathan White
parent 9aa30c4e72
commit 9fc30265c8

View File

@ -169,6 +169,12 @@ elseif(KEEPASSXC_DIST_TYPE STREQUAL "Other")
unset(KEEPASSXC_DIST) unset(KEEPASSXC_DIST)
endif() endif()
if(${CMAKE_VERSION} VERSION_GREATER_EQUAL "3.14.0")
cmake_policy(SET CMP0083 NEW)
include(CheckPIESupported)
check_pie_supported()
endif()
# Create position independent code for shared libraries and executables # Create position independent code for shared libraries and executables
set(CMAKE_POSITION_INDEPENDENT_CODE ON) set(CMAKE_POSITION_INDEPENDENT_CODE ON)