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

Commit adb84be

Browse files
committedMay 11, 2012
Updated macros and icon
·
2.0.32.0.1
1 parent 5ff93cc commit adb84be

File tree

7 files changed

+128
-48
lines changed

7 files changed

+128
-48
lines changed
 

‎CMakeLists.txt

Lines changed: 3 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -93,16 +93,6 @@ if ( LUA_USE_DLOPEN )
9393
list ( APPEND LIBS dl )
9494
endif ()
9595

96-
if ( LUA_WIN )
97-
# Add extra rc files to the windows build
98-
if ( MSVC OR MINGW )
99-
set ( LUA_DEF src/lua.def )
100-
set ( LUA_DLL_RC src/lua_dll.rc )
101-
set ( LUA_RC src/lua.rc )
102-
set ( LUAC_RC src/luac.rc )
103-
endif ()
104-
endif ()
105-
10696
if ( LUA_USE_READLINE )
10797
# Add readline
10898
include_directories ( ${READLINE_INCLUDE_DIR} )
@@ -204,16 +194,16 @@ SET(DEPS
204194

205195
## COMPILE
206196
include_directories ( ${CMAKE_CURRENT_BINARY_DIR} dynasm src )
207-
add_library ( liblua SHARED ${SRC_JIT} ${SRC_LIB} src/lua_dll.rc ${DEPS} ) #old: src/lua.def
197+
add_library ( liblua SHARED ${SRC_JIT} ${SRC_LIB} ${DEPS} )
208198
target_link_libraries ( liblua ${LIBS} )
209199
set_target_properties ( liblua PROPERTIES OUTPUT_NAME lua CLEAN_DIRECT_OUTPUT 1 )
210200

211-
add_executable ( lua src/luajit.c src/lua.rc )
201+
add_executable ( lua src/luajit.c src/luajit.rc )
212202
target_link_libraries ( lua liblua )
213203

214204
# On windows a variant of the lua interpreter without console output needs to be built
215205
if(LUA_BUILD_WLUA)
216-
add_executable ( wlua WIN32 src/luajit.c src/lua.rc )
206+
add_executable ( wlua WIN32 src/luajit.c src/luajit.rc )
217207
target_link_libraries ( wlua liblua )
218208
install_executable ( wlua )
219209
endif()

‎cmake/FindLua.cmake

Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
# Locate Lua library
2+
# This module defines
3+
# LUA_EXECUTABLE, if found
4+
# LUA_FOUND, if false, do not try to link to Lua
5+
# LUA_LIBRARIES
6+
# LUA_INCLUDE_DIR, where to find lua.h
7+
# LUA_VERSION_STRING, the version of Lua found (since CMake 2.8.8)
8+
#
9+
# Note that the expected include convention is
10+
# #include "lua.h"
11+
# and not
12+
# #include <lua/lua.h>
13+
# This is because, the lua location is not standardized and may exist
14+
# in locations other than lua/
15+
16+
#=============================================================================
17+
# Copyright 2007-2009 Kitware, Inc.
18+
# Modified to support Lua 5.2 by LuaDist 2012
19+
#
20+
# Distributed under the OSI-approved BSD License (the "License");
21+
# see accompanying file Copyright.txt for details.
22+
#
23+
# This software is distributed WITHOUT ANY WARRANTY; without even the
24+
# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
25+
# See the License for more information.
26+
#=============================================================================
27+
# (To distribute this file outside of CMake, substitute the full
28+
# License text for the above reference.)
29+
#
30+
# The required version of Lua can be specified using the
31+
# standard syntax, e.g. FIND_PACKAGE(Lua 5.1)
32+
# Otherwise the module will search for any available Lua implementation
33+
34+
# Always search for non-versioned lua first (recommended)
35+
SET(_POSSIBLE_LUA_INCLUDE include include/lua)
36+
SET(_POSSIBLE_LUA_EXECUTABLE lua)
37+
SET(_POSSIBLE_LUA_LIBRARY lua)
38+
39+
# Determine possible naming suffixes (there is no standard for this)
40+
IF(Lua_FIND_VERSION_MAJOR AND Lua_FIND_VERSION_MINOR)
41+
SET(_POSSIBLE_SUFFIXES "${Lua_FIND_VERSION_MAJOR}${Lua_FIND_VERSION_MINOR}" "${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR}" "-${Lua_FIND_VERSION_MAJOR}.${Lua_FIND_VERSION_MINOR}")
42+
ELSE(Lua_FIND_VERSION_MAJOR AND Lua_FIND_VERSION_MINOR)
43+
SET(_POSSIBLE_SUFFIXES "52" "5.2" "-5.2" "51" "5.1" "-5.1")
44+
ENDIF(Lua_FIND_VERSION_MAJOR AND Lua_FIND_VERSION_MINOR)
45+
46+
# Set up possible search names and locations
47+
FOREACH(_SUFFIX ${_POSSIBLE_SUFFIXES})
48+
LIST(APPEND _POSSIBLE_LUA_INCLUDE "include/lua${_SUFFIX}")
49+
LIST(APPEND _POSSIBLE_LUA_EXECUTABLE "lua${_SUFFIX}")
50+
LIST(APPEND _POSSIBLE_LUA_LIBRARY "lua${_SUFFIX}")
51+
ENDFOREACH(_SUFFIX)
52+
53+
# Find the lua executable
54+
FIND_PROGRAM(LUA_EXECUTABLE
55+
NAMES ${_POSSIBLE_LUA_EXECUTABLE}
56+
)
57+
58+
# Find the lua header
59+
FIND_PATH(LUA_INCLUDE_DIR lua.h
60+
HINTS
61+
$ENV{LUA_DIR}
62+
PATH_SUFFIXES ${_POSSIBLE_LUA_INCLUDE}
63+
PATHS
64+
~/Library/Frameworks
65+
/Library/Frameworks
66+
/usr/local
67+
/usr
68+
/sw # Fink
69+
/opt/local # DarwinPorts
70+
/opt/csw # Blastwave
71+
/opt
72+
)
73+
74+
# Find the lua library
75+
FIND_LIBRARY(LUA_LIBRARY
76+
NAMES ${_POSSIBLE_LUA_LIBRARY}
77+
HINTS
78+
$ENV{LUA_DIR}
79+
PATH_SUFFIXES lib64 lib
80+
PATHS
81+
~/Library/Frameworks
82+
/Library/Frameworks
83+
/usr/local
84+
/usr
85+
/sw
86+
/opt/local
87+
/opt/csw
88+
/opt
89+
)
90+
91+
IF(LUA_LIBRARY)
92+
# include the math library for Unix
93+
IF(UNIX AND NOT APPLE)
94+
FIND_LIBRARY(LUA_MATH_LIBRARY m)
95+
SET( LUA_LIBRARIES "${LUA_LIBRARY};${LUA_MATH_LIBRARY}" CACHE STRING "Lua Libraries")
96+
# For Windows and Mac, don't need to explicitly include the math library
97+
ELSE(UNIX AND NOT APPLE)
98+
SET( LUA_LIBRARIES "${LUA_LIBRARY}" CACHE STRING "Lua Libraries")
99+
ENDIF(UNIX AND NOT APPLE)
100+
ENDIF(LUA_LIBRARY)
101+
102+
# Determine Lua version
103+
IF(LUA_INCLUDE_DIR AND EXISTS "${LUA_INCLUDE_DIR}/lua.h")
104+
FILE(STRINGS "${LUA_INCLUDE_DIR}/lua.h" lua_version_str REGEX "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua .+\"")
105+
106+
STRING(REGEX REPLACE "^#define[ \t]+LUA_RELEASE[ \t]+\"Lua ([^\"]+)\".*" "\\1" LUA_VERSION_STRING "${lua_version_str}")
107+
UNSET(lua_version_str)
108+
ENDIF()
109+
110+
INCLUDE(FindPackageHandleStandardArgs)
111+
# handle the QUIETLY and REQUIRED arguments and set LUA_FOUND to TRUE if
112+
# all listed variables are TRUE
113+
FIND_PACKAGE_HANDLE_STANDARD_ARGS(Lua
114+
REQUIRED_VARS LUA_LIBRARIES LUA_INCLUDE_DIR
115+
VERSION_VAR LUA_VERSION_STRING)
116+
117+
MARK_AS_ADVANCED(LUA_INCLUDE_DIR LUA_LIBRARIES LUA_LIBRARY LUA_MATH_LIBRARY LUA_EXECUTABLE)
118+

‎cmake/lua.cmake

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ macro ( install_lua_executable _name _source )
3838
if ( NOT SKIP_LUA_WRAPPER )
3939
enable_language ( C )
4040

41-
find_package ( Lua51 REQUIRED )
41+
find_package ( Lua REQUIRED )
4242
include_directories ( ${LUA_INCLUDE_DIR} )
4343

4444
set ( _wrapper ${CMAKE_CURRENT_BINARY_DIR}/${_name}.c )
@@ -210,7 +210,7 @@ macro ( _lua_module_helper is_install _name )
210210
endif ()
211211
else () # Lua C binary module
212212
enable_language ( C )
213-
find_package ( Lua51 REQUIRED )
213+
find_package ( Lua REQUIRED )
214214
include_directories ( ${LUA_INCLUDE_DIR} )
215215

216216
set ( _module "${_module}${CMAKE_SHARED_MODULE_SUFFIX}" )

‎dist.info

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ maintainer = "Peter Drahoš"
1111

1212
-- Offers functionality of the following packages
1313
provides = {
14-
"lua-5.1.4"
14+
"lua-5.1.5"
1515
}
1616

1717
-- These packages conflict (shared lib and executable clash)

‎etc/luajit.ico

102 KB
Binary file not shown.

‎src/lua.rc

Lines changed: 0 additions & 28 deletions
This file was deleted.

‎src/lua_dll.rc renamed to ‎src/luajit.rc

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,12 +10,12 @@ BEGIN
1010
BEGIN
1111
VALUE "Comments", "www.luajit.org\0"
1212
VALUE "CompanyName", "luajit.org\0"
13-
VALUE "FileDescription", "LuaJIT runtime library\0"
14-
VALUE "FileVersion", "2.0.0-beta6\0"
13+
VALUE "FileDescription", "LuaJIT is a JIT copmiler for the Lua language\0"
14+
VALUE "FileVersion", "2.0.0-beta10\0"
1515
VALUE "LegalCopyright", "Copyright � Mike Pall.\0"
1616
VALUE "OriginalFilename", "luajit.exe\0"
17-
VALUE "ProductName", "LuaJIT, JIT copmiler for the LuaLanguage\0"
18-
VALUE "ProductVersion", "2.0.0\0"
17+
VALUE "ProductName", "LuaJIT\0"
18+
VALUE "ProductVersion", "2.0.0-beta10\0"
1919
VALUE "PrivateBuild", "Built for LuaDist\0"
2020
END
2121
END

0 commit comments

Comments
 (0)
This repository has been archived.