New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
V3 android cmake support #18154
V3 android cmake support #18154
Conversation
Looks good, so i have to merge cocos2d/cocos2d-x-3rd-party-libs-bin#300 to test it right? Could you please show me the steps to use cmake in gradle, thanks? |
|
thanks, i have CMake installed in system(Mac OS), should the CMake be installed from android studio package manger again? And in which path should i run |
Yes you shod install it from package manager(it will be installed inside SDK folder) if google does not change this, android studio does not use system CMake. |
Guys, |
Sorry for a long response, I really appreciate this patch. @newnon Following your steps, I have tested it using latest code, it occurred a path error ,and then I fixed it in this commit. finally Suggestion:
|
@crazyhappygame support other platforms is on schedule, but I couldn't give you the deadline, we can do it together to make it done earlier. |
OK I will try to do it as soon as possible. |
you know we have to make sure all android project support cmake well, the tests project, the template project, even the lib project. really a lot of work to do for us. |
@newnon would it be possible with cmake to build cocos2d-x once and use build output libraries in other games? I would like to save compilation time for my android games. |
Any progress about cmake ? @newnon You can have a try to use the output libraries in your game, hope for your feedback @crazyhappygame |
7e1c05f
to
0fb42f5
Compare
@drelaptop cleared version rebased on top of current v3 |
@crazyhappygame unfortunately i haven't try this options, but it is possible. |
…3-merge-android-cmake
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
when change the cmake files of Android, I suggest keep other platform logic same. If not, do test to confirm the logic right.
cocos/network/CMakeLists.txt
Outdated
elseif(MACOSX) | ||
set(COCOS_NETWORK_PLATFORM_SRC | ||
network/CCDownloader-apple.mm | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error occur when you delete this line, compile error on mac:
[ 82%] Linking CXX executable ../../bin/cpp_tests.app/Contents/MacOS/cpp_tests
Undefined symbols for architecture x86_64:
"cocos2d::network::DownloaderApple::DownloaderApple(cocos2d::network::DownloaderHints const&)", referenced from:
cocos2d::network::Downloader::Downloader(cocos2d::network::DownloaderHints const&) in libcocos2dInternal.a(CCDownloader.cpp.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
you can merge this to fix newnon#5
This commit fix js-tests build error on mac, and build success, but run failed, only a black box appear. please help to do some check if you have free time. #18545 have been fixed too, run failed is strange, please give some instructions about black box if you have time recently. @dumganhar |
V3 merge android cmake, fix error for network module
Sorry, some config difference exist on js-tests, build right and run success, App path is different from others, see ├── cpp_empty_test.app
│ └── Contents
├── cpp_tests.app
│ └── Contents
├── js-tests
│ ├── js-tests
│ ├── main.js
│ ├── project.json
│ ├── res
│ ├── script
│ └── src
├── lua-tests.app
│ └── Contents
└── lua_empty_test.app
└── Contents
Now, this branch on macOS(not include iOS) platform, cocos2d-x cmake build success, all tests project run success too.
|
V3 android cmake support Lua & JS
@drelaptop please write a doc for it and ask developers to test it. Thanks. |
yeah, I should do that, a sample guide have been added in the http://discuss.cocos2d-x.org/t/in-progress-cmake-support-all-platform-for-cocos2d-x/41164/13 I will add cmake android guide later |
CMake build improvements & android CMake support
add to graddle.properties
PROP_NDK_MODE=cmake
replace files in folder external/android-specific
android-specific.zip
last PR #17100
pull request for external
cocos2d/cocos2d-x-3rd-party-libs-bin#300