# Copyright (C) 2007-2012 LuaDist.
# Created by Peter Drahoš, Peter Kapec
# Redistribution and use of this file is allowed according to the terms of the MIT license.
# For details see the COPYRIGHT file distributed with LuaDist.
# Please note that the package source code is licensed under its own license.
project ( lua C )
cmake_minimum_required ( VERSION 2.8 )
include ( cmake/dist.cmake )
include ( lua )
## CONFIGURATION
# Default configuration (we assume POSIX by default)
set ( LUA_PATH "LUA_PATH" CACHE STRING "Environment variable to use as package.path." )
set ( LUA_CPATH "LUA_CPATH" CACHE STRING "Environment variable to use as package.cpath." )
set ( LUA_INIT "LUA_INIT" CACHE STRING "Environment variable for initial script." )
SET(EXECUTABLE_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/arm) #设置可执行文件的输出目录
SET(LIBRARY_OUTPUT_PATH ${PROJECT_SOURCE_DIR}/arm) #设置库文件的输出目录
option ( LUA_ANSI "Use only ansi features." OFF )
option ( LUA_USE_RELATIVE_LOADLIB "Use modified loadlib.c with support for relative paths on posix systems."
ON )
set ( LUA_IDSIZE 60 CACHE NUMBER "gives the maximum size for the description of the source." )
set ( LUA_PROMPT "> " CACHE STRING "Is the default prompt used by stand-alone Lua." )
set ( LUA_PROMPT2 ">> " CACHE STRING "Is the default continuation prompt used by stand-alone Lua." )
set ( LUA_MAXINPUT 512 CACHE NUMBER "Is the maximum length for an input line in the stand-alone interpreter." )
#2DO: LUAI_* and LUAL_* settings, for now defaults are used.
set ( LUA_DIRSEP "/" )
set ( LUA_MODULE_SUFFIX ${CMAKE_SHARED_MODULE_SUFFIX} )
set ( LUA_LDIR ${INSTALL_LMOD} )
set ( LUA_CDIR ${INSTALL_CMOD} )
if ( LUA_USE_RELATIVE_LOADLIB )
# This will set up relative paths to lib
string ( REGEX REPLACE "[^!/]+" ".." LUA_DIR "!/${INSTALL_BIN}/" )
else ( )
# Direct path to installation
set ( LUA_DIR ${CMAKE_INSTALL_PREFIX} CACHE STRING "Destination from which modules will be resolved. See INSTALL_LMOD and INSTALL_CMOD." )
endif ( )
set ( LUA_PATH_DEFAULT "./?.lua;${LUA_DIR}${LUA_LDIR}/?.lua;${LUA_DIR}${LUA_LDIR}/?/init.lua;./?/init.lua" )
set ( LUA_CPATH_DEFAULT "./?${LUA_MODULE_SUFFIX};${LUA_DIR}${LUA_CDIR}/?${LUA_MODULE_SUFFIX};${LUA_DIR}${LUA_CDIR}/loadall${LUA_MODULE_SUFFIX}" )
if ( WIN32 AND NOT CYGWIN )
# Windows systems
option ( LUA_WIN "Windows specific build." ON )
option ( LUA_BUILD_WLUA "Build wLua interpretter without console output." ON )
option ( LUA_BUILD_AS_DLL "Build Lua library as Dll." ${BUILD_SHARED_LIBS} )
# Paths (Double escapes needed)
set ( LUA_DIRSEP "\\\\" )
string ( REPLACE " /" ${LUA_DIRSEP} LUA_DIR "${LUA_DIR}" )
string ( REPLACE "/" ${LUA_DIRSEP} LUA_LDIR "${LUA_LDIR}" )
string ( REPLACE "/" ${LUA_DIRSEP} LUA_CDIR "${LUA_CDIR}" )
string ( REPLACE "/" ${LUA_DIRSEP} LUA_PATH_DEFAULT "${LUA_PATH_DEFAULT}" )
string ( REPLACE "/" ${LUA_DIRSEP} LUA_CPATH_DEFAULT "${LUA_CPATH_DEFAULT}" )
else ( )
# Posix systems (incl. Cygwin)
option ( LUA_USE_POSIX "Use POSIX functionality." ON )
option ( LUA_USE_DLOPEN "Use dynamic linker to load modules." ON )
option ( LUA_USE_MKSTEMP "Use mkstep." ON )
option ( LUA_USE_ISATTY "Use tty." ON )
option ( LUA_USE_POPEN "Use popen." ON )
option ( LUA_USE_ULONGJMP "Use ulongjmp" ON )
endif ( )
## SETUP
# Optional libraries
find_package ( Readline )
if ( READLINE_FOUND )
option ( LUA_USE_READLINE "Use readline in the Lua CLI." ON )
endif ( )
find_package ( Curses )
if ( CURSES_FOUND )
option ( LUA_USE_CURSES "Use curses in the Lua CLI." ON )
endif ( )
# Setup needed variables and libraries
if ( LUA_USE_POSIX )
# On POSIX Lua links to standard math library "m"
find_library ( MATH_LIBRARY NAMES m )
if ( MATH_LIBRARY )
list ( APPEND LIBS ${MATH_LIBRARY} )
endif ( )
endif ( )
if ( LUA_USE_DLOPEN )
# Link to dynamic linker library "dl"
find_library ( DL_LIBRARY NAMES dl )
if ( DL_LIBRARY )
list ( APPEND LIBS ${DL_LIBRARY} )
endif ( )
endif ( )
if ( LUA_WIN )
# Add extra rc files to the windows build
if ( MSVC OR MINGW )
set ( LUA_DEF src/lua.def )
set ( LUA_DLL_RC src/lua_dll.rc )
set ( LUA_RC src/lua.rc )
set ( LUAC_RC src/luac.rc )
endif ( )
endif ( )
if ( LUA_USE_READLINE )
# Add readline
include_directories ( ${READLINE_INCLUDE_DIR} )
list ( APPEND LIBS ${READLINE_LIBRARY} )
endif ( )
if ( LUA_USE_CURSES )
# Add curses
include_directories ( ${CURSES_INCLUDE_DIR} )
list ( APPEND LIBS ${CURSES_LIBRARY} )
endif ( )
## SOURCES
# Generate luaconf.h
configure_file ( src/luaconf.h.in ${CMAKE_CURRENT_BINARY_DIR}/luaconf.h )
# Sources and headers
include_directories ( src ${CMAKE_CURRENT_BINARY_DIR} )
set ( SRC_LIB src/lapi.c src/lcode.c src/ldebug.c src/ldo.c src/ldump.c src/lfunc.c
src/lgc.c src/llex.c src/lmem.c src/lobject.c src/lopcodes.c src/lparser.c src/lstate.c
src/lstring.c src/ltable.c src/ltm.c src/lundump.c src/lvm.c src/lzio.c src/lauxlib.c
src/lbaselib.c src/ldblib.c src/liolib.c src/lmathlib.c src/loslib.c src/ltablib.c
src/lstrlib.c src/linit.c )
set ( SRC_LUA src/lua.c )
set ( SRC_LUAC src/luac.c src/print.c )
if ( LUA_USE_RELATIVE_LOADLIB )
# Use modified loadlib
list ( APPEND SRC_LIB src/loadlib_rel.c )
else ( )
list ( APPEND SRC_LIB src/loadlib.c )
endif ( )
## BUILD
# Create dynamic library
add_library ( liblua SHARED ${SRC_LIB} ${LUA_DLL_RC} ${LUA_DEF} )
target_link_libraries ( liblua ${LIBS} )
set_target_properties ( liblua PROPERTIES OUTPUT_NAME lua CLEAN_DIRECT_OUTPUT 1 )
if ( LUA_BUILD_AS_DLL )
set_target_properties ( liblua PROPERTIES COMPILE_DEFINITIONS LUA_BUILD_AS_DLL )
endif ( )
# Create static library, this is needed to compile luac in the 5.1.x Lua series
add_library ( lua_static STATIC ${SRC_LIB} )
target_link_libraries ( lua_static ${LIBS} )
add_executable ( lua ${SRC_LUA} ${LUA_RC} )
target_link_libraries ( lua liblua )
# On windows a variant of the lua interpreter without console output needs to be built
if ( LUA_BUILD_WLUA )
add_executable ( wlua WIN32 src/wmain.c ${SRC_LUA} ${LUA_RC} )
target_link_libraries ( wlua liblua )
install_executable ( wlua )
endif ( )
add_executable ( luac ${SRC_LUAC} ${LUAC_RC} )
target_link_libraries ( luac lua_static )
#install_executable ( lua luac )
install_library ( liblua )
install_data ( README.md COPYRIGHT HISTORY )
install_lua_module ( strict etc/strict.lua )
install_header ( src/lua.h src/lualib.h src/lauxlib.h etc/lua.hpp ${CMAKE_CURRENT_BINARY_DIR}/luaconf.h )
install_doc ( doc/ )
install_foo ( etc/ )
install_test ( test/ )
## TESTS
set ( LUA lua )
add_lua_test ( test/bisect.lua )
add_lua_test ( test/cf.lua )
add_lua_test ( test/echo.lua )
add_lua_test ( test/env.lua )
add_lua_test ( test/factorial.lua )
add_lua_test ( test/fib.lua 20 )
add_lua_test ( test/fibfor.lua )
#add_lua_test ( test/globals.lua ) # Requires input
add_lua_test ( test/hello.lua )
file ( READ test/life.lua _data )
# life.lua test, with reduced run-time.
string ( REPLACE "40,20" "20,15" _data "${_data}" )
string ( REPLACE 2000 20 _data "${_data}" )
file ( WRITE ${CMAKE_CURRENT_BINARY_DIR}/test/life-quick.lua "${_data}" )
add_lua_test ( ${CMAKE_CURRENT_BINARY_DIR}/test/life-quick.lua )
#add_lua_test ( test/luac.lua ) # Requires input
add_lua_test ( test/printf.lua )
#add_lua_test ( test/readonly.lua )
#set_property ( TEST readonly PROPERTY PASS_REGULAR_EXPRESSION "cannot redefine global variable `y'" )
add_lua_test ( test/sieve.lua )
add_lua_test ( test/sort.lua )
#add_lua_test ( test/table.lua ) # Requires input
add_lua_test ( test/trace-calls.lua )
add_lua_test ( test/trace-globals.lua )
#add_lua_test ( test/xd.lua ) # Requires input
file(GLOB lua_h "src/*.h")
file(INSTALL ${lua_h} DESTINATION ${PROJECT_SOURCE_DIR}/arm/include/)
没有合适的资源?快使用搜索试试~ 我知道了~
安卓UE4 FPS游戏测试读取数据测试作弊ue4_cheat_engine.zip
共599个文件
h:258个
cpp:99个
c:94个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 73 浏览量
2024-04-14
19:43:30
上传
评论
收藏 18.42MB ZIP 举报
温馨提示
这个C#实现的小游戏是一个简单的猜数字游戏,让玩家猜一个1到100之间的随机生成的数字。以下是对这个小游戏的分析: Random 类的使用:游戏开始时,使用 Random 类生成一个1到100之间的随机数作为要猜的数字。 循环结构:游戏使用 while 循环,直到玩家猜对为止。玩家每次猜测后,根据猜测的数字与目标数字的大小关系,给出相应的提示,并根据猜测结果决定下一步的操作。 用户输入处理:通过 Console.ReadLine() 获取用户输入,并使用 int.TryParse() 方法将输入转换为整数。如果用户输入无效,会提示用户输入有效的数字。 游戏逻辑:根据玩家猜测的数字与目标数字的大小关系,给出相应的提示,提示玩家猜的数字是太高了还是太低了。 【引流】 Java、Python、Node.js、Spring Boot、Django、Express、MySQL、PostgreSQL、MongoDB、React、Angular、Vue、Bootstrap、Material-UI、Redis、Docker、Kubernetes
资源推荐
资源详情
资源评论
收起资源包目录
安卓UE4 FPS游戏测试读取数据测试作弊ue4_cheat_engine.zip (599个子文件)
lua.1 4KB
luac.1 4KB
libhv_static.a 19.09MB
libhv_static.a 18.98MB
libhv_static.a 15.61MB
libhv_static.a 14.25MB
liblua_static.a 1.88MB
liblua_static.a 1.73MB
liblua_static.a 1.15MB
liblua_static.a 1.01MB
luavs.bat 1KB
b.bat 614B
build.bat 347B
b.bat 333B
m.bat 182B
build32.bat 41B
build64.bat 39B
Android.bp 519B
Android.bp 519B
Android.bp 519B
Android.bp 519B
http_parser.c 70KB
lparser.c 36KB
hloop.c 28KB
lstrlib.c 23KB
lvm.c 23KB
lapi.c 22KB
loadlib_rel.c 21KB
lcode.c 21KB
lgc.c 20KB
loadlib.c 19KB
lauxlib.c 17KB
lbaselib.c 17KB
ldebug.c 16KB
ltable.c 16KB
nio.c 15KB
ldo.c 15KB
liolib.c 13KB
overlapio.c 13KB
llex.c 12KB
hlog.c 10KB
hsocket.c 10KB
lua.c 10KB
ldblib.c 10KB
webbench.c 10KB
hssl.c 10KB
dns.c 9KB
websocket_parser.c 8KB
sha1.c 8KB
multipart_parser.c 8KB
ltablib.c 7KB
ftp.c 7KB
htime.c 7KB
md5.c 7KB
smtp.c 7KB
hbase.c 6KB
loslib.c 6KB
lmathlib.c 6KB
lstate.c 6KB
lobject.c 5KB
kqueue.c 5KB
nc.c 5KB
print.c 5KB
luac.c 5KB
hevent.c 5KB
lundump.c 5KB
lfunc.c 5KB
select.c 4KB
tcp_chat_server.c 4KB
icmp.c 4KB
evport.c 4KB
epoll.c 4KB
base64.c 4KB
hmutex_test.c 4KB
poll.c 3KB
ldump.c 3KB
lstring.c 3KB
hloop_test.c 3KB
lopcodes.c 3KB
ftp_test.c 2KB
httpdef.c 2KB
tcp_echo_server.c 2KB
nlog.c 2KB
iocp.c 2KB
tcp_proxy_server.c 2KB
lmem.c 2KB
libuv_echo.c 2KB
libev_echo.c 2KB
libevent_echo.c 2KB
htimer_test.c 2KB
ltm.c 2KB
lzio.c 2KB
sha1_test.c 1KB
md5_test.c 1KB
udp_proxy_server.c 1KB
noparser.c 1KB
wsdef.c 1KB
udp_echo_server.c 1KB
hversion.c 986B
connect_test.c 848B
共 599 条
- 1
- 2
- 3
- 4
- 5
- 6
资源评论
枫蜜柚子茶
- 粉丝: 5829
- 资源: 2972
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功