modify project for Android studio

This commit is contained in:
shuxin   zheng 2019-10-15 21:54:17 +08:00
parent 49ec082487
commit 42b69691b5
4 changed files with 19 additions and 9 deletions

View File

@ -25,7 +25,7 @@
<option name="MANIFEST_FILE_RELATIVE_PATH" value="/src/main/AndroidManifest.xml" />
<option name="RES_FOLDER_RELATIVE_PATH" value="/src/main/res" />
<option name="RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/src/main/res;file://$MODULE_DIR$/build/generated/res/rs/debug;file://$MODULE_DIR$/build/generated/res/resValues/debug" />
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="" />
<option name="TEST_RES_FOLDERS_RELATIVE_PATH" value="file://$MODULE_DIR$/build/generated/res/rs/androidTest/debug" />
<option name="ASSETS_FOLDER_RELATIVE_PATH" value="/src/main/assets" />
<option name="PROJECT_TYPE" value="1" />
</configuration>

View File

@ -45,8 +45,8 @@ android {
}
cmake {
//arguments '-DANDROID_PLATFORM=android-14','-DANDROID_TOOLCHAIN=clang'
targets 'acl_static', 'protocol_static', 'acl_cpp_static', 'acl', 'protocol', 'acl_cpp'
//targets 'acl_static', 'protocol_static', 'acl_cpp_static'
//targets 'acl_static', 'protocol_static', 'acl_cpp_static', 'acl', 'protocol', 'acl_cpp'
targets 'acl_static', 'protocol_static', 'acl_cpp_static'
}
}
}

View File

@ -5,5 +5,5 @@
# For customization when using a Version Control System, please read the
# header note.
#Tue Oct 15 16:48:29 CST 2019
ndk.dir=/Users/shuxinzheng/Library/Android/sdk-3.5/ndk-bundle
sdk.dir=/Users/shuxinzheng/Library/Android/sdk-3.5
ndk.dir=/Users/shuxinzheng/Library/Android/sdk/ndk-bundle
sdk.dir=/Users/shuxinzheng/Library/Android/sdk

View File

@ -79,14 +79,22 @@ if not is_plat("windows") then
"-Wstrict-prototypes",
"-fdata-sections",
"-ffunction-sections",
"-fPIC")
"-fPIC",
"-fno-rtti",
"-fno-exceptions",
"-fomit-frame-pointer"
)
add_cxxflags("-Wshadow",
"-Wpointer-arith",
"-Wno-long-long",
"-Wuninitialized",
"-fdata-sections",
"-ffunction-sections",
"-fPIC")
"-fPIC",
"-fno-rtti",
"-fno-exceptions",
"-fomit-frame-pointer"
)
if is_kind("static") then
add_cxflags("-fvisibility-inlines-hidden")
@ -100,7 +108,9 @@ if not is_plat("windows") then
end
end
add_defines("_REENTRANT", "_USE_FAST_MACRO", "_POSIX_PTHREAD_SEMANTICS", "_GNU_SOURCE=1")
--add_defines("ACL_CLIENT_ONLY")
if is_plat("android") then
add_defines("ACL_CLIENT_ONLY")
end
add_defines("ACL_PREPARE_COMPILE")
add_defines("ANDROID")
add_defines("NDEBUG")
@ -117,7 +127,7 @@ end
-- include project sources
includes("app/**/xmake.lua", "lib_acl", "lib_protocol", "lib_acl_cpp")
if is_plat("linux") then
if is_plat("linux") and not is_plat("android") then
includes("lib_fiber/c", "lib_fiber/cpp")
end