From ad272ac6901e979e7431d72629e3189727eed037 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Wed, 8 Jun 2022 00:32:15 +0200 Subject: [PATCH] Set POSITION_INDEPENDENT_CODE property on SDL2 for CMake 3.0 --- CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/CMakeLists.txt b/CMakeLists.txt index 751bddd85..294575e96 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2939,6 +2939,7 @@ if(SDL_SHARED) add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES}) # alias target for in-tree builds add_library(SDL2::SDL2 ALIAS SDL2) + set_target_properties(SDL2 PROPERTIES POSITION_INDEPENDENT_CODE TRUE) if(APPLE) set_target_properties(SDL2 PROPERTIES MACOSX_RPATH 1