mirror of https://github.com/encounter/SDL.git
Set POSITION_INDEPENDENT_CODE property on SDL2 for CMake 3.0
This commit is contained in:
parent
e8d89ce28f
commit
ad272ac690
|
@ -2939,6 +2939,7 @@ if(SDL_SHARED)
|
||||||
add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES})
|
add_library(SDL2 SHARED ${SOURCE_FILES} ${VERSION_SOURCES})
|
||||||
# alias target for in-tree builds
|
# alias target for in-tree builds
|
||||||
add_library(SDL2::SDL2 ALIAS SDL2)
|
add_library(SDL2::SDL2 ALIAS SDL2)
|
||||||
|
set_target_properties(SDL2 PROPERTIES POSITION_INDEPENDENT_CODE TRUE)
|
||||||
if(APPLE)
|
if(APPLE)
|
||||||
set_target_properties(SDL2 PROPERTIES
|
set_target_properties(SDL2 PROPERTIES
|
||||||
MACOSX_RPATH 1
|
MACOSX_RPATH 1
|
||||||
|
|
Loading…
Reference in New Issue