From b8892e446b8b349a5e4cf7dd63df186630710f15 Mon Sep 17 00:00:00 2001 From: halx99 Date: Sat, 13 Mar 2021 18:46:13 +0800 Subject: [PATCH] Merge: 91bfb7c8ff a5cf017e0f Merge pull request #330 from c4games/lua54-compat Lua 5.4 compatible --- cocos/CMakeLists.txt | 2 +- extensions/CMakeLists.txt | 2 +- extensions/scripting/lua-bindings/script/init.lua | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index dcaedf98de..940dd5e6aa 100644 --- a/cocos/CMakeLists.txt +++ b/cocos/CMakeLists.txt @@ -151,7 +151,7 @@ set_target_properties(${ENGINEX_CORE_LIB} PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" VERSION "${ENGINEX_VERSION}" FOLDER "Internal" ) diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt index 8ed7a91162..a3c9d58632 100644 --- a/extensions/CMakeLists.txt +++ b/extensions/CMakeLists.txt @@ -48,7 +48,7 @@ function(setup_cocos_extension_config target_name) PROPERTIES ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" - RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib" FOLDER "Extensions" ) diff --git a/extensions/scripting/lua-bindings/script/init.lua b/extensions/scripting/lua-bindings/script/init.lua index 6c8eeb20ba..670609c77e 100644 --- a/extensions/scripting/lua-bindings/script/init.lua +++ b/extensions/scripting/lua-bindings/script/init.lua @@ -22,6 +22,12 @@ THE SOFTWARE. ]] +if (math.pow == nil) then + math.pow = function (x,y) + return x ^ y + end +end + require "cocos.cocos2d.Cocos2d" require "cocos.cocos2d.Cocos2dConstants" require "cocos.cocos2d.functions"