diff --git a/CMakeLists.txt b/CMakeLists.txt index 856d9843e173..a93ddbc4f16e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -47,21 +47,23 @@ include(PreventInSourceBuilds) # works before build libcocos2d include(CocosBuildSet) -set(BUILD_LUA_LIBS ON) - add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core) # prevent tests project to build "cocos2d-x/cocos" again set(BUILD_ENGINE_DONE ON) # add cpp tests default -add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/cpp-empty-test ${ENGINE_BINARY_PATH}/tests/cpp-empty-test) -add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/cpp-tests ${ENGINE_BINARY_PATH}/tests/cpp-tests) +if(BUILD_CPP_TESTS) + add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/cpp-empty-test ${ENGINE_BINARY_PATH}/tests/cpp-empty-test) + add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/cpp-tests ${ENGINE_BINARY_PATH}/tests/cpp-tests) +endif() if(BUILD_LUA_LIBS) add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/lua-empty-test/project ${ENGINE_BINARY_PATH}/tests/lua-empty-test) add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/lua-tests/project ${ENGINE_BINARY_PATH}/tests/lua-test) -endif(BUILD_LUA_LIBS) +endif() -# add cpp-template-default into project(Cocos2d-x) for tmp test -add_subdirectory(${COCOS2DX_ROOT_PATH}/templates/cpp-template-default ${ENGINE_BINARY_PATH}/tests/HelloCpp) +if(BUILD_CPP_TEMPLATE) + # add cpp-template-default into project(Cocos2d-x) for tmp test + add_subdirectory(${COCOS2DX_ROOT_PATH}/templates/cpp-template-default ${ENGINE_BINARY_PATH}/tests/HelloCpp) +endif() diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index 4accdfeffdfd..26bf6cbb5086 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -148,10 +148,12 @@ if(XCODE OR VS) cocos_mark_code_files("cocos2d") endif() -if(${CMAKE_VERSION} VERSION_GREATER "3.16.0") - message("CMake 3.16 target_precompile_headers") - target_precompile_headers(cocos2d PRIVATE - "$<$:cocos2d.h>") +if(!APPLE) + if(${CMAKE_VERSION} VERSION_GREATER "3.16.0") + message("CMake 3.16 target_precompile_headers") + target_precompile_headers(cocos2d PRIVATE + "$<$:cocos2d.h>") + endif() endif() #if(XCODE) diff --git a/download-deps.py b/download-deps.py index 07afedb174b9..a9f9d89bf302 100755 --- a/download-deps.py +++ b/download-deps.py @@ -5,7 +5,7 @@ # ./download-deps.py # # Downloads Cocos2D-x 3rd party dependencies from github: -# https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin) and extracts the zip +# https://github.com/heroiclabs/cocos2d-x-3rd-party-libs-bin) and extracts the zip # file # # Having the dependencies outside the official cocos2d-x repo helps prevent diff --git a/external/config.json b/external/config.json index 507ce0d56778..dc4a83630328 100644 --- a/external/config.json +++ b/external/config.json @@ -1,8 +1,8 @@ { - "version": "metal-support-22", + "version": "e8f42341de16c620179bcf25e4b539db122b7565", "zip_file_size": "146254799", "repo_name": "cocos2d-x-3rd-party-libs-bin", - "repo_parent": "https://github.com/cocos2d/", + "repo_parent": "https://github.com/heroiclabs/", "move_dirs": { "fbx-conv": "tools" }