proxmark3/client/deps/lua.cmake

57 lines
1.9 KiB
CMake
Raw Normal View History

2020-05-06 20:45:02 +08:00
add_library(pm3rrg_rdv4_lua STATIC
2020-04-16 16:57:53 +08:00
liblua/lapi.c
liblua/lcode.c
liblua/lctype.c
liblua/ldebug.c
liblua/ldo.c
liblua/ldump.c
liblua/lfunc.c
liblua/lgc.c
2024-09-20 23:01:52 +08:00
liblua/linit.c
2020-04-16 16:57:53 +08:00
liblua/llex.c
liblua/lmem.c
liblua/lobject.c
liblua/lopcodes.c
liblua/lparser.c
liblua/lstate.c
liblua/lstring.c
liblua/ltable.c
liblua/ltm.c
liblua/lundump.c
liblua/lvm.c
liblua/lzio.c
liblua/lauxlib.c
liblua/lbaselib.c
liblua/lcorolib.c
liblua/ldblib.c
liblua/liolib.c
liblua/lmathlib.c
2024-09-20 23:01:52 +08:00
liblua/loadlib.c
2020-04-16 16:57:53 +08:00
liblua/loslib.c
liblua/lstrlib.c
liblua/ltablib.c
2024-09-20 23:01:52 +08:00
liblua/lutf8lib.c
2020-04-16 16:57:53 +08:00
)
2020-05-06 20:45:02 +08:00
target_compile_definitions(pm3rrg_rdv4_lua PRIVATE LUA_COMPAT_ALL)
if (NOT MINGW)
if (APPLE)
2020-05-06 20:45:02 +08:00
target_compile_definitions(pm3rrg_rdv4_lua PRIVATE LUA_USE_MACOSX)
elseif (ANDROID)
# Required:
add_definitions(-D"getlocaledecpoint\(\)='.'")
# Same as for LUA_USE_LINUX except LUA_USE_POSIX and client-specific LUA_USE_READLINE
target_compile_definitions(pm3rrg_rdv4_lua PRIVATE LUA_USE_DLOPEN LUA_USE_STRTODHEX LUA_USE_AFORMAT LUA_USE_LONGLONG)
# Same as for LUA_USE_POSIX except client-specific LUA_USE_ISATTY. LUA_USE_MKSTEMP is needed.
target_compile_definitions(pm3rrg_rdv4_lua PRIVATE LUA_USE_MKSTEMP LUA_USE_POPEN LUA_USE_ULONGJMP LUA_USE_GMTIME_R)
else (APPLE)
2020-05-06 20:45:02 +08:00
target_compile_definitions(pm3rrg_rdv4_lua PRIVATE LUA_USE_LINUX)
target_link_libraries(pm3rrg_rdv4_lua INTERFACE dl)
endif (APPLE)
endif (NOT MINGW)
2020-05-06 20:45:02 +08:00
target_include_directories(pm3rrg_rdv4_lua INTERFACE liblua)
target_compile_options(pm3rrg_rdv4_lua PRIVATE -Wall -Werror -O3)
2020-05-06 20:45:02 +08:00
set_property(TARGET pm3rrg_rdv4_lua PROPERTY POSITION_INDEPENDENT_CODE ON)