From 48cce75be498f0b7333b08504eb8b24c4eda99ba Mon Sep 17 00:00:00 2001 From: leda Date: Fri, 12 Oct 2018 12:36:17 +0800 Subject: [PATCH] remove un-elegant prebuilt feature in cmake (#19109) * remove unclearly cmake prebuilt feature * reduce useless code * add project info print --- cmake/Modules/CocosBuildHelpers.cmake | 41 +-------------- cmake/Modules/CocosBuildSet.cmake | 4 ++ cmake/Modules/CocosCompileOptions.cmake | 46 +--------------- cmake/Modules/CocosConfigDepend.cmake | 1 - cmake/Modules/CocosSelectModule.cmake | 12 +---- cmake/README.md | 52 ------------------- cocos/CMakeLists.txt | 2 +- .../proj.android/app/build.gradle | 5 -- .../runtime-src/proj.android/app/build.gradle | 5 -- .../runtime-src/proj.android/app/build.gradle | 5 -- .../proj.android/app/build.gradle | 5 -- tests/cpp-tests/proj.android/app/build.gradle | 5 -- .../project/proj.android/app/build.gradle | 5 -- .../project/proj.android/app/build.gradle | 5 -- .../project/proj.android/app/build.gradle | 5 -- 15 files changed, 9 insertions(+), 189 deletions(-) diff --git a/cmake/Modules/CocosBuildHelpers.cmake b/cmake/Modules/CocosBuildHelpers.cmake index bc6fa009e8..ad3428a43f 100644 --- a/cmake/Modules/CocosBuildHelpers.cmake +++ b/cmake/Modules/CocosBuildHelpers.cmake @@ -1,23 +1,5 @@ include(CMakeParseArguments) -# find a prebuilt lib by `lib_name` and save the result in `lib_out` -function(cocos_find_prebuilt_lib_by_name lib_name lib_out) - set(search_path ${COCOS_PREBUILT_PATH}) - if(XCODE OR VS) - set(search_path ${COCOS_PREBUILT_PATH}/${CMAKE_BUILD_TYPE}) - endif() - message(STATUS "search_path cocos prebuilt library: ${search_path}") - find_library(found_lib ${lib_name} PATHS ${search_path} NO_DEFAULT_PATH NO_CMAKE_FIND_ROOT_PATH) - - if(found_lib) - message(STATUS "found cocos prebuilt library: ${found_lib}") - else() - message(STATUS "can't found cocos prebuilt library: ${lib_name}") - endif() - set(${lib_out} ${found_lib} PARENT_SCOPE) - unset(found_lib CACHE) -endfunction() - # copy resource `FILES` and `FOLDERS` to `COPY_TO` folder function(cocos_copy_res) set(oneValueArgs COPY_TO) @@ -114,21 +96,6 @@ function(cocos_copy_target_dll cocos_target) endforeach() endfunction() -# find dlls in a dir which `LIB_ABS_PATH` located, and save the result in `dlls_out` -function(cocos_find_dlls_for_lib dlls_out) - set(oneValueArgs LIB_ABS_PATH) - cmake_parse_arguments(opt "" "${oneValueArgs}" "${multiValueArgs}" ${ARGN}) - get_filename_component(lib_dir ${opt_LIB_ABS_PATH} DIRECTORY) - file(GLOB lib_dir_files "${lib_dir}/*") - set(cc_dlls) - foreach(dir_file ${lib_dir_files}) - if(${dir_file} MATCHES "dll$") - list(APPEND cc_dlls ${dir_file}) - endif() - endforeach() - set(${dlls_out} ${cc_dlls} PARENT_SCOPE) -endfunction() - # mark `FILES` as resources, files will be put into sub-dir tree depend on its absolute path function(cocos_mark_resources) set(oneValueArgs BASEDIR RESOURCEBASE) @@ -215,12 +182,6 @@ function(setup_cocos_app_config app_name) cocos_mark_code_files(${APP_NAME}) endif() - # generate prebuilt auto when build app if GEN_COCOS_PREBUILT=ON - # tocheck, do we really need prebuilt cocos2dx libs? - if(GEN_COCOS_PREBUILT) - add_dependencies(${APP_NAME} prebuilt) - endif() - set(APP_BIN_DIR ${APP_BIN_DIR} PARENT_SCOPE) set(APP_RES_DIR ${APP_RES_DIR} PARENT_SCOPE) endfunction() @@ -311,7 +272,7 @@ endfunction(set_xcode_property) # works same as find_package, but do additional care to properly find macro(cocos_find_package pkg_name pkg_prefix) - if(NOT USE_EXTERNAL_PREBUILT OR NOT ${pkg_prefix}_FOUND) + if(NOT ${pkg_prefix}_FOUND) find_package(${pkg_name} ${ARGN}) endif() if(NOT ${pkg_prefix}_INCLUDE_DIRS AND ${pkg_prefix}_INCLUDE_DIR) diff --git a/cmake/Modules/CocosBuildSet.cmake b/cmake/Modules/CocosBuildSet.cmake index e9ea8f7efa..31caf1d93d 100644 --- a/cmake/Modules/CocosBuildSet.cmake +++ b/cmake/Modules/CocosBuildSet.cmake @@ -32,9 +32,13 @@ endif() set(COCOS_EXTERNAL_DIR ${COCOS2DX_ROOT_PATH}/external) set(ENGINE_BINARY_PATH ${PROJECT_BINARY_DIR}/engine) +message(STATUS "PROJECT_NAME:" ${PROJECT_NAME}) +message(STATUS "PROJECT_SOURCE_DIR:" ${PROJECT_SOURCE_DIR}) message(STATUS "COCOS2DX_ROOT_PATH:" ${COCOS2DX_ROOT_PATH}) message(STATUS "CMAKE_MODULE_PATH:" ${CMAKE_MODULE_PATH}) message(STATUS "COCOS_EXTERNAL_DIR:" ${COCOS_EXTERNAL_DIR}) +# delete binary dir if you hope a full clean re-build +message(STATUS "PROJECT_BINARY_DIR:" ${PROJECT_BINARY_DIR}) message(STATUS "ENGINE_BINARY_PATH:" ${ENGINE_BINARY_PATH}) # include helper functions for cmake build diff --git a/cmake/Modules/CocosCompileOptions.cmake b/cmake/Modules/CocosCompileOptions.cmake index ecaa802901..aba389de92 100644 --- a/cmake/Modules/CocosCompileOptions.cmake +++ b/cmake/Modules/CocosCompileOptions.cmake @@ -47,17 +47,6 @@ endif() message(STATUS "CMAKE_BUILD_TYPE: ${CMAKE_BUILD_TYPE}") - # ARCH_DIR only useful for search linux prebuilt libs - if(LINUX) - if(CMAKE_SIZEOF_VOID_P EQUAL 8) - set(ARCH_DIR "64-bit") - elseif(CMAKE_SIZEOF_VOID_P EQUAL 4) - set(ARCH_DIR "32-bit") - else() - message(WARNING "CMAKE_SIZEOF_VOID_P: ${CMAKE_SIZEOF_VOID_P}") - endif() - endif() - # check and print compiler infos if("${CMAKE_CXX_COMPILER_ID}" STREQUAL "Clang") set(COMPILER_STRING ${CMAKE_CXX_COMPILER_ID}) @@ -160,7 +149,7 @@ return() endif() - if(CMAKE_FIND_ROOT_PATH AND USE_EXTERNAL_PREBUILT) + if(CMAKE_FIND_ROOT_PATH) # Adds cocos2d-x external folder to the list of valid include/library paths when cross-compiling and using prebuilds set(CMAKE_FIND_ROOT_PATH ${CMAKE_FIND_ROOT_PATH} ${COCOS_EXTERNAL_DIR}) endif() @@ -183,39 +172,6 @@ endif() endif() - # check prebuilt config - if(GEN_COCOS_PREBUILT AND USE_COCOS_PREBUILT) - message(FATAL_ERROR "can't generate prebuilt libs and use prebuilt libs at the same time") - endif() - if(GEN_COCOS_PREBUILT OR USE_COCOS_PREBUILT) - if(DEFINED COCOS_PREBUILT_ROOT) - message(STATUS "pre-defined COCOS_PREBUILT_ROOT: ${COCOS_PREBUILT_ROOT}") - else() - # the default prebuilt path is cocos2d-x/prebuilt - set(COCOS_PREBUILT_ROOT $ENV{COCOS_TEMPLATES_ROOT}/../prebuilt) - endif() - if(NOT IS_DIRECTORY ${COCOS_PREBUILT_ROOT}) - message(STATUS "prebuilt root directory defined but not existed, create: ${COCOS_PREBUILT_ROOT}") - file(MAKE_DIRECTORY ${COCOS_PREBUILT_ROOT}) - endif() - if(IS_DIRECTORY ${COCOS_PREBUILT_ROOT}) - # prebuilt libs path - set(COCOS_PREBUILT_PATH ${COCOS_PREBUILT_ROOT}/${PLATFORM_FOLDER}/${CMAKE_BUILD_TYPE}) - if(XCODE OR VS) - set(COCOS_PREBUILT_PATH ${COCOS_PREBUILT_ROOT}/${PLATFORM_FOLDER}) - endif() - if(ANDROID) - set(COCOS_PREBUILT_PATH ${COCOS_PREBUILT_ROOT}/${PLATFORM_FOLDER}/${ANDROID_ABI}) - endif() - message(STATUS "COCOS_PREBUILT_PATH:" ${COCOS_PREBUILT_PATH}) - else() - if(ANDROID) - message(WARNING "using cmake in Android Studio, can't get value of environment variable, please define COCOS_PREBUILT_ROOT manually") - endif() - message(FATAL_ERROR "can't find prebuilt libs location") - endif() - endif() - # custom target property for dll collect define_property(TARGET PROPERTY CC_DEPEND_DLLS diff --git a/cmake/Modules/CocosConfigDepend.cmake b/cmake/Modules/CocosConfigDepend.cmake index 2c37db3dbb..5602a0dd6d 100644 --- a/cmake/Modules/CocosConfigDepend.cmake +++ b/cmake/Modules/CocosConfigDepend.cmake @@ -143,7 +143,6 @@ endmacro() macro(target_use_cocos2dx_depend target) cocos2dx_depend() cocos2dx_define() - message(STATUS "${target} prepare to use system depend: ${PLATFORM_SPECIFIC_LIBS}") foreach(platform_lib ${PLATFORM_SPECIFIC_LIBS}) target_link_libraries(${target} ${platform_lib}) endforeach() diff --git a/cmake/Modules/CocosSelectModule.cmake b/cmake/Modules/CocosSelectModule.cmake index 0a8310597c..bd3918c1ea 100644 --- a/cmake/Modules/CocosSelectModule.cmake +++ b/cmake/Modules/CocosSelectModule.cmake @@ -1,10 +1,4 @@ -# the default behavior of using prebuilt -set(GEN_COCOS_PREBUILT_DEFAULT OFF) -set(USE_COCOS_PREBUILT_DEFAULT OFF) - # the default behavior of build module -set(USE_WEBP_DEFAULT ON) -set(USE_EXTERNAL_PREBUILT_DEFAULT ON) set(BUILD_LUA_LIBS_DEFAULT OFF) set(BUILD_JS_LIBS_DEFAULT OFF) @@ -12,7 +6,7 @@ option(USE_CHIPMUNK "Use chipmunk for physics library" ON) option(USE_BOX2D "Use box2d for physics library" OFF) option(USE_BULLET "Use bullet for physics3d library" ON) option(USE_RECAST "Use Recast for navigation mesh" ON) -option(USE_WEBP "Use WebP codec" ${USE_WEBP_DEFAULT}) +option(USE_WEBP "Use WebP codec" ON) option(USE_PNG "Use PNG codec" ON) option(USE_TIFF "Use TIFF codec" ON) option(USE_JPEG "Use JPEG codec" ON) @@ -24,6 +18,4 @@ option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON) option(BUILD_EDITOR_COCOSBUILDER "Build editor support for cocosbuilder" ON) option(BUILD_LUA_LIBS "Build lua libraries" ${BUILD_LUA_LIBS_DEFAULT}) option(BUILD_JS_LIBS "Build js libraries" ${BUILD_JS_LIBS_DEFAULT}) -option(USE_EXTERNAL_PREBUILT "Use prebuilt libraries in external directory" ${USE_EXTERNAL_PREBUILT_DEFAULT}) -option(GEN_COCOS_PREBUILT "generate cocos static libraries, put libraries into prebuilt folder in cocos root" ${GEN_COCOS_PREBUILT_DEFAULT}) -option(USE_COCOS_PREBUILT "use cocos static libraries, return warning if not find" ${USE_COCOS_PREBUILT_DEFAULT}) + diff --git a/cmake/README.md b/cmake/README.md index 372c670562..c5c1c33b18 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -69,42 +69,6 @@ PROP_BUILD_TYPE=cmake If you want to add cmake build arguments, please add it at [external Native Build](https://github.com/cocos2d/cocos2d-x/blob/84be684e3858393a6f3efc50e3f95d4e0ac92a20/tests/cpp-empty-test/proj.android/app/build.gradle#L25) block of __app/build.gradle__ file. -## Prebuilt libraries feature - -To solve long compilation times of the engine source code one can use prebuilt libraries. Using this feature you only need build engine sources once for a specific environment or again when the engine version changes and you wish to utilize the new version. - -### Example - -This is an example of building c++ libs once, and use them in different c++ projects. - -```sh -cocos new -l cpp -p my.pack.app1 test_app1 -mkdir app1_build && cd app1_build -cmake ../test_app1 -DGEN_COCOS_PREBUILT=ON -make prebuilt -``` - -Change option `GEN_COCOS_PREBUILT` and use instead `USE_COCOS_PREBUILT` to use prebuilt in the same project - -```sh -cmake ../test_app1 -DGEN_COCOS_PREBUILT=OFF -DUSE_COCOS_PREBUILT=ON -make TemplateCpp -open bin/TemplateCpp.app -``` - -Add `-DUSE_COCOS_PREBUILT=ON` to use prebuilt libs in another cmake build. - -```sh -cocos new -l cpp -p my.pack.app2 test_app2 -mkdir app2_build && cd app2_build -cmake ../test_app2 -DUSE_COCOS_PREBUILT=ON -make TemplateCpp -open bin/TemplateCpp.app -``` - -> Any other cpp project can use prebuilt in this way - -When using the prebuilt libraries on Android there is a small difference as CMake can't find system environment when built using Gradle. You need to [supply a path](https://github.com/cocos2d/cocos2d-x/blob/c087be314c2c56a757bf66163b173746b5d6ad34/tests/cpp-empty-test/proj.android/app/build.gradle#L34) as the location of prebuilt libs. ## Build Options @@ -127,22 +91,6 @@ When using the prebuilt libraries on Android there is a small difference as CMak * `cmake --build ./msvc_build`, cmake will sellect corresponding build tools. -### Cocos2d-x Options - -1. __`GEN_COCOS_PREBUILT`__, control the project have the feature to generate pre-build libraries or not. Default value is `OFF` - - * `-DGEN_COCOS_PREBUILT=ON`, will add target prebuilt, build this target will generate prebuilt libraries - -1. __`USE_COCOS_PREBUILT`__, control the project have the feature to use pre-build libraries or not. Default value is `OFF` - - * `-DUSE_COCOS_PREBUILT=ON`, will disable libraries target, and make app target use prebuilt libraries - -1. __`COCOS_PREBUILT_ROOT`__, a path means the prebuilt libraries root location, it's not optional for Android Project on Android Studio, optional for other supported platforms. the default value is $cocos2dx_root/prebuilt if the cmake can access to cocos2d-x environment variable. for example - - * `arguments "-DCOCOS_PREBUILT_ROOT=/Users/laptop/cocos-prebuilt"` set this value on [cmake block](https://github.com/cocos2d/cocos2d-x/blob/84be684e3858393a6f3efc50e3f95d4e0ac92a20/tests/cpp-empty-test/proj.android/app/build.gradle#L31) of build.gradle file. - -1. Any options in [SelectModule.cmake](./Modules/SelectModule.cmake) can be set manually. Do it if you know what you're doing. - ## Useful Links * CMake Official website: [cmake.org](https://cmake.org/) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index 868f30b847..871e17d758 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -30,7 +30,7 @@ # build jscocos2d if BUILD_JS_LIBS=ON # The version number -set(COCOS2D_X_VERSION 3.17) +set(COCOS2D_X_VERSION 3.18) set(COCOS_CORE_LIB cocos2d) diff --git a/templates/cpp-template-default/proj.android/app/build.gradle b/templates/cpp-template-default/proj.android/app/build.gradle index a413eb2a83..853e2a298a 100644 --- a/templates/cpp-template-default/proj.android/app/build.gradle +++ b/templates/cpp-template-default/proj.android/app/build.gradle @@ -37,11 +37,6 @@ android { arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", \ "-DUSE_CHIPMUNK=TRUE", "-DUSE_BULLET=TRUE" cppFlags "-frtti -fexceptions" - // prebuilt root must be defined as a directory which you have right to access or create if you use prebuilt - // set "-DGEN_COCOS_PREBUILT=ON" and "-DUSE_COCOS_PREBUILT=OFF" to generate prebuilt, this way build cocos2d-x libs - // set "-DGEN_COCOS_PREBUILT=OFF" and "-DUSE_COCOS_PREBUILT=ON" to use prebuilt, this way not build cocos2d-x libs - //arguments "-DCOCOS_PREBUILT_ROOT=/Users/laptop/cocos-prebuilt" - //arguments "-DGEN_COCOS_PREBUILT=OFF", "-DUSE_COCOS_PREBUILT=OFF" } } } diff --git a/templates/js-template-default/frameworks/runtime-src/proj.android/app/build.gradle b/templates/js-template-default/frameworks/runtime-src/proj.android/app/build.gradle index 9a24c86e8a..6e9be754e8 100644 --- a/templates/js-template-default/frameworks/runtime-src/proj.android/app/build.gradle +++ b/templates/js-template-default/frameworks/runtime-src/proj.android/app/build.gradle @@ -36,11 +36,6 @@ android { arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", \ "-DUSE_CHIPMUNK=TRUE", "-DUSE_BULLET=TRUE", "-DBUILD_JS_LIBS=TRUE" cppFlags "-frtti -fexceptions" - // prebuilt root must be defined as a directory which you have right to access or create if you use prebuilt - // set "-DGEN_COCOS_PREBUILT=ON" and "-DUSE_COCOS_PREBUILT=OFF" to generate prebuilt, this way build cocos2d-x libs - // set "-DGEN_COCOS_PREBUILT=OFF" and "-DUSE_COCOS_PREBUILT=ON" to use prebuilt, this way not build cocos2d-x libs - //arguments "-DCOCOS_PREBUILT_ROOT=/Users/laptop/cocos-prebuilt" - //arguments "-DGEN_COCOS_PREBUILT=OFF", "-DUSE_COCOS_PREBUILT=OFF" } } } diff --git a/templates/lua-template-default/frameworks/runtime-src/proj.android/app/build.gradle b/templates/lua-template-default/frameworks/runtime-src/proj.android/app/build.gradle index f10ce92df6..8ee0ea73ba 100644 --- a/templates/lua-template-default/frameworks/runtime-src/proj.android/app/build.gradle +++ b/templates/lua-template-default/frameworks/runtime-src/proj.android/app/build.gradle @@ -36,11 +36,6 @@ android { arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", \ "-DUSE_CHIPMUNK=TRUE", "-DUSE_BULLET=TRUE", "-DBUILD_LUA_LIBS=TRUE" cppFlags "-frtti -fexceptions" - // prebuilt root must be defined as a directory which you have right to access or create if you use prebuilt - // set "-DGEN_COCOS_PREBUILT=ON" and "-DUSE_COCOS_PREBUILT=OFF" to generate prebuilt, this way build cocos2d-x libs - // set "-DGEN_COCOS_PREBUILT=OFF" and "-DUSE_COCOS_PREBUILT=ON" to use prebuilt, this way not build cocos2d-x libs - //arguments "-DCOCOS_PREBUILT_ROOT=/Users/laptop/cocos-prebuilt" - //arguments "-DGEN_COCOS_PREBUILT=OFF", "-DUSE_COCOS_PREBUILT=OFF" } } } diff --git a/tests/cpp-empty-test/proj.android/app/build.gradle b/tests/cpp-empty-test/proj.android/app/build.gradle index 55f2c5579b..31c4a615c3 100644 --- a/tests/cpp-empty-test/proj.android/app/build.gradle +++ b/tests/cpp-empty-test/proj.android/app/build.gradle @@ -37,11 +37,6 @@ android { arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE" cppFlags "-frtti -fexceptions" - // prebuilt root must be defined as a directory which you have right to access or create if you use prebuilt - // set "-DGEN_COCOS_PREBUILT=ON" and "-DUSE_COCOS_PREBUILT=OFF" to generate prebuilt, this way build cocos2d-x libs - // set "-DGEN_COCOS_PREBUILT=OFF" and "-DUSE_COCOS_PREBUILT=ON" to use prebuilt, this way not build cocos2d-x libs - //arguments "-DCOCOS_PREBUILT_ROOT=/Users/laptop/cocos-prebuilt" - //arguments "-DGEN_COCOS_PREBUILT=OFF", "-DUSE_COCOS_PREBUILT=ON" } } } diff --git a/tests/cpp-tests/proj.android/app/build.gradle b/tests/cpp-tests/proj.android/app/build.gradle index 2316c87a24..0d76faa469 100644 --- a/tests/cpp-tests/proj.android/app/build.gradle +++ b/tests/cpp-tests/proj.android/app/build.gradle @@ -37,11 +37,6 @@ android { arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", \ "-DUSE_CHIPMUNK=TRUE", "-DUSE_BULLET=TRUE" cppFlags "-frtti -fexceptions" - // prebuilt root must be defined as a directory which you have right to access or create if you use prebuilt - // set "-DGEN_COCOS_PREBUILT=ON" and "-DUSE_COCOS_PREBUILT=OFF" to generate prebuilt, this way build cocos2d-x libs - // set "-DGEN_COCOS_PREBUILT=OFF" and "-DUSE_COCOS_PREBUILT=ON" to use prebuilt, this way not build cocos2d-x libs - //arguments "-DCOCOS_PREBUILT_ROOT=/Users/laptop/cocos-prebuilt" - //arguments "-DGEN_COCOS_PREBUILT=OFF", "-DUSE_COCOS_PREBUILT=OFF" } } } diff --git a/tests/js-tests/project/proj.android/app/build.gradle b/tests/js-tests/project/proj.android/app/build.gradle index b66147c396..5265372f92 100644 --- a/tests/js-tests/project/proj.android/app/build.gradle +++ b/tests/js-tests/project/proj.android/app/build.gradle @@ -37,11 +37,6 @@ android { arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", \ "-DUSE_CHIPMUNK=TRUE", "-DUSE_BULLET=TRUE", "-DBUILD_JS_LIBS=TRUE" cppFlags "-frtti -fexceptions" - // prebuilt root must be defined as a directory which you have right to access or create if you use prebuilt - // set "-DGEN_COCOS_PREBUILT=ON" and "-DUSE_COCOS_PREBUILT=OFF" to generate prebuilt, this way build cocos2d-x libs - // set "-DGEN_COCOS_PREBUILT=OFF" and "-DUSE_COCOS_PREBUILT=ON" to use prebuilt, this way not build cocos2d-x libs - //arguments "-DCOCOS_PREBUILT_ROOT=/Users/laptop/cocos-prebuilt" - //arguments "-DGEN_COCOS_PREBUILT=OFF", "-DUSE_COCOS_PREBUILT=OFF" } } } diff --git a/tests/lua-empty-test/project/proj.android/app/build.gradle b/tests/lua-empty-test/project/proj.android/app/build.gradle index 736ed3e730..069731ccfd 100644 --- a/tests/lua-empty-test/project/proj.android/app/build.gradle +++ b/tests/lua-empty-test/project/proj.android/app/build.gradle @@ -37,11 +37,6 @@ android { arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", \ "-DUSE_CHIPMUNK=TRUE", "-DUSE_BULLET=TRUE", "-DBUILD_LUA_LIBS=TRUE" cppFlags "-frtti -fexceptions" - // prebuilt root must be defined as a directory which you have right to access or create if you use prebuilt - // set "-DGEN_COCOS_PREBUILT=ON" and "-DUSE_COCOS_PREBUILT=OFF" to generate prebuilt, this way build cocos2d-x libs - // set "-DGEN_COCOS_PREBUILT=OFF" and "-DUSE_COCOS_PREBUILT=ON" to use prebuilt, this way not build cocos2d-x libs - //arguments "-DCOCOS_PREBUILT_ROOT=/Users/laptop/cocos-prebuilt" - //arguments "-DGEN_COCOS_PREBUILT=OFF", "-DUSE_COCOS_PREBUILT=OFF" } } } diff --git a/tests/lua-tests/project/proj.android/app/build.gradle b/tests/lua-tests/project/proj.android/app/build.gradle index 4d5efca0d7..fc22e233df 100644 --- a/tests/lua-tests/project/proj.android/app/build.gradle +++ b/tests/lua-tests/project/proj.android/app/build.gradle @@ -37,11 +37,6 @@ android { arguments "-DCMAKE_FIND_ROOT_PATH=", "-DANDROID_STL=c++_static", "-DANDROID_TOOLCHAIN=clang", "-DANDROID_ARM_NEON=TRUE", \ "-DUSE_CHIPMUNK=TRUE", "-DUSE_BULLET=TRUE", "-DBUILD_LUA_LIBS=TRUE" cppFlags "-frtti -fexceptions" - // prebuilt root must be defined as a directory which you have right to access or create if you use prebuilt - // set "-DGEN_COCOS_PREBUILT=ON" and "-DUSE_COCOS_PREBUILT=OFF" to generate prebuilt, this way build cocos2d-x libs - // set "-DGEN_COCOS_PREBUILT=OFF" and "-DUSE_COCOS_PREBUILT=ON" to use prebuilt, this way not build cocos2d-x libs - //arguments "-DCOCOS_PREBUILT_ROOT=/Users/laptop/cocos-prebuilt" - //arguments "-DGEN_COCOS_PREBUILT=OFF", "-DUSE_COCOS_PREBUILT=OFF" } } }