Skip to content

Commit

Permalink
support for m1
Browse files Browse the repository at this point in the history
  • Loading branch information
zhongfq committed Jul 30, 2023
1 parent 51666a5 commit 14755b9
Show file tree
Hide file tree
Showing 16 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion frameworks/3rd/png/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ if(PNG_HARDWARE_OPTIMIZATIONS)
)
if(${PNG_ARM_NEON} STREQUAL "on")
add_definitions(-DPNG_ARM_NEON_OPT=2)
elseif(${PNG_ARM_NEON} STREQUAL "check")
elseif(${PNG_ARM_NEON} STREQUAL "check" AND NOT APPLE)
add_definitions(-DPNG_ARM_NEON_CHECK_SUPPORTED)
endif()
else()
Expand Down
10 changes: 8 additions & 2 deletions frameworks/cclua/src/olua/olua.c
Original file line number Diff line number Diff line change
Expand Up @@ -415,10 +415,16 @@ OLUA_API void *olua_toobj(lua_State *L, int idx, const char *cls)

OLUA_API void olua_delobj(lua_State *L, void *obj)
{
if (olua_getrawobj(L, obj)) {
if (!obj) {
return;
}
olua_pushobjtable(L);
if (olua_rawgetp(L, -1, obj) == LUA_TUSERDATA) {
olua_setrawobj(L, -1, NULL);
lua_pop(L, 1);
}
lua_pushnil(L); // L: objtable ud nil
olua_rawsetp(L, -3, obj);
lua_pop(L, 2);
}

OLUA_API const char *olua_objstring(lua_State *L, int idx)
Expand Down
4 changes: 4 additions & 0 deletions frameworks/toolset/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ else()
set(OS "linux")
endif()

if(APPLE)
set(CMAKE_OSX_ARCHITECTURES "x86_64;arm64")
endif()

if(LUA STREQUAL "lua54")
add_subdirectory(lua)
get_filename_component(LUA_INCLUDE "../3rd/lua"
Expand Down
2 changes: 1 addition & 1 deletion tools/lua-bindings/olua
Submodule olua updated 2 files
+8 −2 olua.c
+2 −2 tools/init.lua
Binary file modified tools/lua/lua53/macos/cjson.so
Binary file not shown.
Binary file modified tools/lua/lua53/macos/lfs.so
Binary file not shown.
Binary file modified tools/lua/lua53/macos/lua
Binary file not shown.
Binary file modified tools/lua/lua53/macos/luac
Binary file not shown.
Binary file modified tools/lua/lua53/macos/md5.so
Binary file not shown.
Binary file modified tools/lua/lua53/macos/xxtea.so
Binary file not shown.
Binary file modified tools/lua/lua54/macos/cjson.so
Binary file not shown.
Binary file modified tools/lua/lua54/macos/lfs.so
Binary file not shown.
Binary file modified tools/lua/lua54/macos/lua
Binary file not shown.
Binary file modified tools/lua/lua54/macos/luac
Binary file not shown.
Binary file modified tools/lua/lua54/macos/md5.so
Binary file not shown.
Binary file modified tools/lua/lua54/macos/xxtea.so
Binary file not shown.

0 comments on commit 14755b9

Please sign in to comment.