Merge pull request #6589 from lioncash/jni

Android/CMakeLists: Remove usages of LIBS and SRCS variables
This commit is contained in:
Markus Wick 2018-04-04 08:57:10 +02:00 committed by GitHub
commit b82539e927
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 17 additions and 13 deletions

View File

@ -1,16 +1,20 @@
list(APPEND LIBS core uicommon)
add_library(main SHARED
ButtonManager.cpp
MainAndroid.cpp
)
set(SRCS ButtonManager.cpp
MainAndroid.cpp)
target_link_libraries(main
PRIVATE
core
uicommon
)
set(SHARED_LIB main)
add_library(${SHARED_LIB} SHARED ${SRCS})
target_link_libraries(${SHARED_LIB}
log
target_link_libraries(main
PRIVATE
android
log
"-Wl,--no-warn-mismatch"
"-Wl,--whole-archive"
${LIBS}
"-Wl,--no-whole-archive"
)
@ -19,4 +23,4 @@ file(REMOVE_RECURSE ${CMAKE_SOURCE_DIR}/Source/Android/app/src/main/assets/Sys/)
file(COPY ${CMAKE_SOURCE_DIR}/Data/Sys DESTINATION ${CMAKE_SOURCE_DIR}/Source/Android/app/src/main/assets/)
file(REMOVE_RECURSE ${CMAKE_SOURCE_DIR}/Source/Android/app/src/main/assets/Sys/Resources/) # not used on Android
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} ${SHARED_LIB})
set(CPACK_PACKAGE_EXECUTABLES ${CPACK_PACKAGE_EXECUTABLES} main)