mirror of
https://github.com/SFML/SFML.git
synced 2025-01-18 23:35:11 +08:00
Use position-independent code on Android even when linking statically
This commit is contained in:
parent
f582f05365
commit
fcf9f78a81
@ -212,6 +212,12 @@ macro(sfml_add_library module)
|
|||||||
sfml_set_common_ios_properties(${target})
|
sfml_set_common_ios_properties(${target})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(SFML_OS_ANDROID)
|
||||||
|
# Always use position-independent code on Android, even when linking statically.
|
||||||
|
# This is needed because all c++ code is placed in a shared library on Android.
|
||||||
|
set_target_properties(${target} PROPERTIES POSITION_INDEPENDENT_CODE ON)
|
||||||
|
endif()
|
||||||
|
|
||||||
# add the install rule
|
# add the install rule
|
||||||
install(TARGETS ${target} EXPORT SFMLConfigExport
|
install(TARGETS ${target} EXPORT SFMLConfigExport
|
||||||
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin
|
RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} COMPONENT bin
|
||||||
|
Loading…
Reference in New Issue
Block a user