Skip to content

Commit 1f84a9f

Browse files
PatriceJiangdrelaptop
authored andcommitted
pick: [lua android] use luajit & template cmake update (cocos2d#19239)
1 parent e60ae0a commit 1f84a9f

File tree

3 files changed

+5
-1
lines changed

3 files changed

+5
-1
lines changed

cocos/scripting/lua-bindings/proj.android/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ add_library(${target_name} STATIC
1414
${${target_name}_src}
1515
)
1616

17-
get_target_property(lua_header ext_lua INTERFACE_INCLUDE_DIRECTORIES)
17+
get_target_property(lua_header ext_luajit INTERFACE_INCLUDE_DIRECTORIES)
1818
get_target_property(tolua_header ext_tolua INTERFACE_INCLUDE_DIRECTORIES)
1919
target_include_directories(${target_name}
2020
PRIVATE ../../..

templates/js-template-default/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,6 +119,8 @@ else()
119119
add_library(${APP_NAME} SHARED ${APP_SRC})
120120
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos/platform/android ${ENGINE_BINARY_PATH}/cocos/platform)
121121
target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
122+
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos/scripting/js-bindings/proj.android ${ENGINE_BINARY_PATH}/cocos/js-android)
123+
target_link_libraries(${APP_NAME} -Wl,--whole-archive js_android_spec -Wl,--no-whole-archive)
122124
endif()
123125

124126
target_link_libraries(${APP_NAME} jscocos2d)

templates/lua-template-default/CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,8 @@ else()
137137
add_library(${APP_NAME} SHARED ${APP_SRC})
138138
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos/platform/android ${ENGINE_BINARY_PATH}/cocos/platform)
139139
target_link_libraries(${APP_NAME} -Wl,--whole-archive cpp_android_spec -Wl,--no-whole-archive)
140+
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos/scripting/lua-bindings/proj.android ${ENGINE_BINARY_PATH}/cocos/lua-android)
141+
target_link_libraries(${APP_NAME} -Wl,--whole-archive lua_android_spec -Wl,--no-whole-archive)
140142
endif()
141143

142144
target_link_libraries(${APP_NAME} luacocos2d)

0 commit comments

Comments
 (0)