[Android] Wrote a native activity acting as a bootstrap
A current limitation prevents one library from depending on shared libraries. As we have legal issues here (LGPL wants us to use shared libs of OpenAL-Soft and libsndfile), we're forced to use this homemade native activity which will manually load our shared libraries.
This commit is contained in:
parent
60894d1c1a
commit
cc0d982f72
6 changed files with 197 additions and 12 deletions
|
@ -97,6 +97,18 @@ macro(sfml_add_library target)
|
|||
set_target_properties(${target} PROPERTIES XCODE_ATTRIBUTE_CLANG_ENABLE_OBJC_ARC YES)
|
||||
endif()
|
||||
|
||||
# sfml-activity library is our bootstrap activity and must not depend on stlport_shared
|
||||
# (otherwise Android will fail to load it)
|
||||
if (ANDROID)
|
||||
if (${target} MATCHES "sfml-activity")
|
||||
set_target_properties(${target} PROPERTIES COMPILE_FLAGS -fpermissive)
|
||||
set_target_properties(${target} PROPERTIES LINK_FLAGS "-landroid -llog")
|
||||
set(CMAKE_CXX_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY_WITHOUT_STLPORT})
|
||||
else()
|
||||
set(CMAKE_CXX_CREATE_SHARED_LIBRARY ${CMAKE_CXX_CREATE_SHARED_LIBRARY_WITH_STLPORT})
|
||||
endif()
|
||||
endif()
|
||||
|
||||
# link the target to its external dependencies
|
||||
if(THIS_EXTERNAL_LIBS)
|
||||
target_link_libraries(${target} ${THIS_EXTERNAL_LIBS})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue