From fa1f2f2d330c0addc6bba5edc7b527a789ce61b8 Mon Sep 17 00:00:00 2001 From: halx99 Date: Fri, 27 Aug 2021 11:41:11 +0800 Subject: [PATCH] Fix lua build for win64 and 1 warning --- cocos/base/ccMacros.h | 2 +- extensions/scripting/lua-bindings/CMakeLists.txt | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cocos/base/ccMacros.h b/cocos/base/ccMacros.h index 525066f2c4..17398234c9 100644 --- a/cocos/base/ccMacros.h +++ b/cocos/base/ccMacros.h @@ -45,7 +45,7 @@ extern bool CC_DLL cc_assert_script_compatible(const char* msg); { \ if (!(cond)) \ { \ - if (!cc_assert_script_compatible(msg) && strlen(msg)) \ + if (msg && *msg && !cc_assert_script_compatible(msg)) \ cocos2d::log("Assert failed: %s", msg); \ CC_ASSERT(cond); \ } \ diff --git a/extensions/scripting/lua-bindings/CMakeLists.txt b/extensions/scripting/lua-bindings/CMakeLists.txt index 5590dacdb3..87f91e51ed 100644 --- a/extensions/scripting/lua-bindings/CMakeLists.txt +++ b/extensions/scripting/lua-bindings/CMakeLists.txt @@ -161,6 +161,10 @@ add_library(${ADXE_LUA_LIB} STATIC ${lua_bindings_files}) target_link_libraries(${ADXE_LUA_LIB} ${ADXE_CORE_LIB}) add_dependencies(${ADXE_LUA_LIB} ${ADXE_CORE_LIB}) +if(MSVC) + target_compile_options(${ADXE_LUA_LIB} PRIVATE /bigobj) +endif() + get_target_property(lua_ext_depend thirdparty CC_LUA_DEPEND) target_link_libraries(${ADXE_LUA_LIB} ${lua_ext_depend})