cmake_minimum_required(VERSION 3.12) project(Lua) add_definitions(-DLUA_COMPAT_5_3) if(UNIX) add_definitions(-DLUA_USE_LINUX) endif(UNIX) ### force options if(WIN32) add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>") add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>") endif() # see https://www.lua.org/manual/5.4/readme.html#other ### build lib set(C_FILES lapi.c lcode.c lctype.c ldebug.c ldo.c ldump.c lfunc.c lgc.c llex.c lmem.c lobject.c lopcodes.c lparser.c lstate.c lstring.c ltable.c ltm.c lundump.c lvm.c lzio.c lauxlib.c lbaselib.c lcorolib.c ldblib.c liolib.c lmathlib.c loadlib.c loslib.c lstrlib.c ltablib.c lutf8lib.c linit.c) # prepend 'src/' list(TRANSFORM C_FILES PREPEND "src/") # in……

阅读全文