diff --git a/src/SFML/Main/CMakeLists.txt b/src/SFML/Main/CMakeLists.txt index babd2b32..9390aa95 100644 --- a/src/SFML/Main/CMakeLists.txt +++ b/src/SFML/Main/CMakeLists.txt @@ -17,6 +17,9 @@ endif() sfml_add_library(sfml-main STATIC SOURCES ${SRC}) if(SFML_OS_ANDROID) + # ensure that linking into shared libraries doesn't fail + set_target_properties(sfml-main PROPERTIES POSITION_INDEPENDENT_CODE ON) + # glad sources target_include_directories(sfml-main SYSTEM PRIVATE "${PROJECT_SOURCE_DIR}/extlibs/headers/glad/include") endif()