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,17 +1,21 @@
list(APPEND LIBS core uicommon) add_library(main SHARED
ButtonManager.cpp
MainAndroid.cpp
)
set(SRCS ButtonManager.cpp target_link_libraries(main
MainAndroid.cpp) PRIVATE
core
uicommon
)
set(SHARED_LIB main) target_link_libraries(main
add_library(${SHARED_LIB} SHARED ${SRCS}) PRIVATE
target_link_libraries(${SHARED_LIB} android
log log
android "-Wl,--no-warn-mismatch"
"-Wl,--no-warn-mismatch" "-Wl,--whole-archive"
"-Wl,--whole-archive" "-Wl,--no-whole-archive"
${LIBS}
"-Wl,--no-whole-archive"
) )
file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/Source/Android/app/src/main/assets/) file(MAKE_DIRECTORY ${CMAKE_SOURCE_DIR}/Source/Android/app/src/main/assets/)
@ -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(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 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)