From d7610b8c7750745feb0cced23c73cfaa9ac31c74 Mon Sep 17 00:00:00 2001 From: halx99 Date: Sat, 13 Mar 2021 18:18:40 +0800 Subject: [PATCH] Improve cmake scripts a. rename project 'plainluac' to 'luac' b. add executable project 'lua' c. unify cmake runtime directory to bin --- cocos/CMakeLists.txt | 2 +- extensions/CMakeLists.txt | 2 +- extensions/scripting/lua-bindings/script/init.lua | 6 ------ 3 files changed, 2 insertions(+), 8 deletions(-) diff --git a/cocos/CMakeLists.txt b/cocos/CMakeLists.txt index 940dd5e6aa..dcaedf98de 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}/lib" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" VERSION "${ENGINEX_VERSION}" FOLDER "Internal" ) diff --git a/extensions/CMakeLists.txt b/extensions/CMakeLists.txt index a3c9d58632..8ed7a91162 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}/lib" + RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/bin" FOLDER "Extensions" ) diff --git a/extensions/scripting/lua-bindings/script/init.lua b/extensions/scripting/lua-bindings/script/init.lua index 670609c77e..6c8eeb20ba 100644 --- a/extensions/scripting/lua-bindings/script/init.lua +++ b/extensions/scripting/lua-bindings/script/init.lua @@ -22,12 +22,6 @@ 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"