Skip to content
This repository was archived by the owner on Nov 20, 2020. It is now read-only.

Commit 0a6d2ee

Browse files
committedSep 30, 2010
Cloned from old repo
1 parent 00dbc0c commit 0a6d2ee

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

110 files changed

+28853
-0
lines changed
 

‎CMakeLists.txt

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# Copyright (C) 2007-2009 LuaDist.
2+
# Created by Peter Drahoš and Peter Kapec
3+
# Redistribution and use of this file is allowed according to the terms of the MIT license.
4+
# For details see the COPYRIGHT file distributed with LuaDist.
5+
# Please note that the package source code is licensed under its own license.
6+
7+
PROJECT ( lua C )
8+
CMAKE_MINIMUM_REQUIRED(VERSION 2.8)
9+
INCLUDE(dist.cmake )
10+
11+
# Determine install host
12+
IF ( WIN32 AND NOT CYGWIN)
13+
ADD_DEFINITIONS ( -DLUA_BUILD_AS_DLL )
14+
IF(MSVC)
15+
ADD_DEFINITIONS(-D_CRT_SECURE_NO_DEPRECATE )
16+
SET(DEF_FILE src/lua.def)
17+
SET(DLL_RC_FILE src/lua_dll.rc)
18+
SET(LUA_RC_FILE src/lua.rc)
19+
SET(LUAC_RC_FILE src/lua_simple.rc)
20+
ENDIF()
21+
ELSE ( )
22+
ADD_DEFINITIONS ( -DLUA_USE_POSIX -DLUA_USE_DLOPEN )
23+
SET ( LIBS m dl )
24+
ENDIF ( )
25+
26+
# Add Readline support when available
27+
FIND_PATH(READLINE_INCLUDE_DIR readline/readline.h)
28+
FIND_LIBRARY(READLINE_LIBRARY NAMES readline)
29+
IF ( READLINE_LIBRARY )
30+
INCLUDE_DIRECTORIES ( ${READLINE_INCLUDE_DIR} )
31+
ADD_DEFINITIONS ( -DLUA_USE_READLINE )
32+
SET ( LIBS ${LIBS} ${READLINE_LIBRARY} )
33+
ENDIF ( )
34+
35+
# Add Curses support when available
36+
INCLUDE(FindCurses)
37+
IF ( CURSES_LIBRARY )
38+
INCLUDE_DIRECTORIES ( ${CURSES_INCLUDE_DIR} )
39+
SET ( LIBS ${LIBS} ${CURSES_LIBRARY} )
40+
ENDIF ( )
41+
42+
# Build Libraries
43+
SET ( SRC_LIBLUA 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/loadlib.c src/linit.c )
44+
45+
ADD_LIBRARY ( liblua SHARED ${SRC_LIBLUA} ${DEF_FILE} ${DLL_RC_FILE})
46+
TARGET_LINK_LIBRARIES ( liblua ${LIBS})
47+
SET_TARGET_PROPERTIES ( liblua PROPERTIES OUTPUT_NAME lua CLEAN_DIRECT_OUTPUT 1 )
48+
49+
ADD_LIBRARY ( liblua_static ${SRC_LIBLUA} )
50+
TARGET_LINK_LIBRARIES ( liblua_static ${LIBS})
51+
52+
INCLUDE_DIRECTORIES ( src )
53+
54+
# Build Executables
55+
SET ( SRC_LUA src/lua.c )
56+
SET ( SRC_LUAC src/luac.c src/print.c )
57+
58+
ADD_EXECUTABLE ( lua ${SRC_LUA} ${LUA_RC_FILE})
59+
ADD_EXECUTABLE ( luac ${SRC_LUAC} ${LUAC_RC_FILE})
60+
TARGET_LINK_LIBRARIES ( lua liblua )
61+
TARGET_LINK_LIBRARIES ( luac liblua_static )
62+
63+
# Install
64+
INSTALL ( TARGETS lua luac RUNTIME DESTINATION ${INSTALL_BIN} )
65+
INSTALL ( TARGETS liblua DESTINATION ${INSTALL_LIB} )
66+
INSTALL ( FILES src/lua.h src/luaconf.h src/lualib.h src/lauxlib.h etc/lua.hpp DESTINATION ${INSTALL_INC} )
67+
INSTALL ( FILES etc/strict.lua DESTINATION ${INSTALL_LMOD} )
68+
INSTALL ( DIRECTORY doc etc test DESTINATION ${INSTALL_DATA} PATTERN ".git" EXCLUDE )
69+
INSTALL ( FILES README COPYRIGHT HISTORY DESTINATION ${INSTALL_DATA} )

‎COPYRIGHT

+34
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
Lua License
2+
-----------
3+
4+
Lua is licensed under the terms of the MIT license reproduced below.
5+
This means that Lua is free software and can be used for both academic
6+
and commercial purposes at absolutely no cost.
7+
8+
For details and rationale, see http://www.lua.org/license.html .
9+
10+
===============================================================================
11+
12+
Copyright (C) 1994-2008 Lua.org, PUC-Rio.
13+
14+
Permission is hereby granted, free of charge, to any person obtaining a copy
15+
of this software and associated documentation files (the "Software"), to deal
16+
in the Software without restriction, including without limitation the rights
17+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18+
copies of the Software, and to permit persons to whom the Software is
19+
furnished to do so, subject to the following conditions:
20+
21+
The above copyright notice and this permission notice shall be included in
22+
all copies or substantial portions of the Software.
23+
24+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
30+
THE SOFTWARE.
31+
32+
===============================================================================
33+
34+
(end of COPYRIGHT)

0 commit comments

Comments
 (0)
This repository has been archived.