2020-11-16 14:47:43 +08:00
|
|
|
|
|
|
|
set(lib_name tolua)
|
|
|
|
set(target_name ${lib_name})
|
|
|
|
|
|
|
|
project(${lib_name})
|
|
|
|
|
|
|
|
set(${target_name}_src
|
|
|
|
tolua_event.c
|
|
|
|
tolua_is.c
|
|
|
|
tolua_map.c
|
|
|
|
tolua_push.c
|
|
|
|
tolua_to.c
|
|
|
|
)
|
|
|
|
|
|
|
|
add_library(${target_name} STATIC
|
|
|
|
${${target_name}_src}
|
|
|
|
)
|
|
|
|
|
2022-02-17 18:06:19 +08:00
|
|
|
if(NOT AX_USE_LUAJIT)
|
|
|
|
target_include_directories(${target_name} PRIVATE ../${AX_LUA_ENGINE})
|
2020-11-16 14:47:43 +08:00
|
|
|
else()
|
2022-02-17 18:06:19 +08:00
|
|
|
target_include_directories(${target_name} PRIVATE ../${AX_LUA_ENGINE}/include)
|
2020-11-16 14:47:43 +08:00
|
|
|
endif()
|
|
|
|
target_include_directories(${target_name} PUBLIC .)
|
|
|
|
|
|
|
|
set_target_properties(${target_name}
|
|
|
|
PROPERTIES
|
|
|
|
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
|
|
|
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
2021-06-08 20:45:55 +08:00
|
|
|
FOLDER "ThirdParty"
|
2020-11-16 14:47:43 +08:00
|
|
|
)
|