mirror of https://github.com/axmolengine/axmol.git
Improve Android cmake (#985)
* Update CMakeLists.txt * Improve Andoid CMAKE
This commit is contained in:
parent
2f54ecaf6d
commit
d79156d728
|
@ -221,6 +221,10 @@ if(MSVC)
|
|||
target_compile_options(${_AX_CORE_LIB} PUBLIC "/Zm2000")
|
||||
endif()
|
||||
|
||||
if(ANDROID)
|
||||
add_subdirectory(${_AX_ROOT_PATH}/core/platform/android ${ENGINE_BINARY_PATH}/core/cpp-android)
|
||||
endif()
|
||||
|
||||
# copy all thirdparty libraries to ${CMAKE_BINARY_DIR}/lib/$<CONFIG>
|
||||
# if (WINDOWS)
|
||||
# copy_thirdparty_dlls(libcocos2d ${CMAKE_BINARY_DIR}/lib/$<CONFIG>)
|
||||
|
|
|
@ -155,7 +155,6 @@ if(NOT ANDROID)
|
|||
else()
|
||||
add_library(${APP_NAME} SHARED ${all_code_files})
|
||||
# whole archive for jni
|
||||
add_subdirectory(${_AX_ROOT_PATH}/core/platform/android ${ENGINE_BINARY_PATH}/core/platform)
|
||||
target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
|
||||
config_android_shared_libs("org.axmol.lib" "${CMAKE_CURRENT_SOURCE_DIR}/proj.android/app/src")
|
||||
endif()
|
||||
|
|
|
@ -161,7 +161,6 @@ else()
|
|||
add_library(${APP_NAME} SHARED ${APP_SRC})
|
||||
|
||||
# whole archive for jni
|
||||
add_subdirectory(${_AX_ROOT_PATH}/core/platform/android ${ENGINE_BINARY_PATH}/core/platform)
|
||||
target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
|
||||
add_subdirectory(${_AX_ROOT_PATH}/extensions/scripting/lua-bindings/proj.android ${ENGINE_BINARY_PATH}/extensions/lua-android)
|
||||
target_link_libraries(${APP_NAME} -Wl,--whole-archive lua_android_spec -Wl,--no-whole-archive)
|
||||
|
|
|
@ -554,7 +554,6 @@ else()
|
|||
add_library(${APP_NAME} SHARED ${all_code_files})
|
||||
|
||||
# whole archive for jni
|
||||
add_subdirectory(${_AX_ROOT_PATH}/core/platform/android ${ENGINE_BINARY_PATH}/core/platform)
|
||||
target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
|
||||
|
||||
config_android_shared_libs("org.axmol.lib" "${CMAKE_CURRENT_SOURCE_DIR}/proj.android/app/src")
|
||||
|
|
|
@ -126,7 +126,6 @@ else()
|
|||
add_library(${APP_NAME} SHARED ${all_code_files})
|
||||
|
||||
# whole archive for jni
|
||||
add_subdirectory(${_AX_ROOT_PATH}/core/platform/android ${ENGINE_BINARY_PATH}/core/platform)
|
||||
target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
|
||||
|
||||
config_android_shared_libs("org.axmol.lib" "${CMAKE_CURRENT_SOURCE_DIR}/proj.android/app/src")
|
||||
|
|
|
@ -134,7 +134,6 @@ if(NOT ANDROID)
|
|||
else()
|
||||
add_library(${APP_NAME} SHARED ${all_code_files})
|
||||
# whole archive for jni
|
||||
add_subdirectory(${_AX_ROOT_PATH}/core/platform/android ${ENGINE_BINARY_PATH}/core/platform)
|
||||
target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
|
||||
config_android_shared_libs("org.axmol.lib" "${CMAKE_CURRENT_SOURCE_DIR}/proj.android/app/src")
|
||||
endif()
|
||||
|
|
|
@ -126,7 +126,6 @@ else()
|
|||
add_library(${APP_NAME} SHARED ${APP_SRC})
|
||||
|
||||
# whole-archive for jni
|
||||
add_subdirectory(${_AX_ROOT_PATH}/core/platform/android ${ENGINE_BINARY_PATH}/core/cpp-android)
|
||||
target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
|
||||
|
||||
add_subdirectory(${_AX_ROOT_PATH}/extensions/scripting/lua-bindings/proj.android ${ENGINE_BINARY_PATH}/extensions/lua-android)
|
||||
|
|
Loading…
Reference in New Issue