forked from cmangos/mangos-tbc
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
-Change Lua library to allow LuaJIT
- Loading branch information
Showing
64 changed files
with
335 additions
and
20,290 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,21 @@ | ||
# | ||
# Copyright (C) 2010 - 2014 Eluna Lua Engine <http://emudevs.com/> | ||
# This program is free software licensed under GPL version 3 | ||
# Please see the included DOCS/LICENSE.md for more information | ||
# | ||
set(LIBRARY_NAME lualib) | ||
set(LUA_VERSION "lua52" CACHE STRING "Lua version to use") | ||
set_property(CACHE LUA_VERSION PROPERTY STRINGS luajit lua51 lua52 lua53 lua54) | ||
MESSAGE(STATUS "Lua version: ${LUA_VERSION}") | ||
|
||
# Avoid warning about DOWNLOAD_EXTRACT_TIMESTAMP in CMake 3.24: | ||
if (CMAKE_VERSION VERSION_GREATER_EQUAL "3.24.0") | ||
cmake_policy(SET CMP0135 NEW) | ||
endif() | ||
|
||
file(GLOB sources *.c) | ||
list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/lua.c) | ||
list(REMOVE_ITEM sources ${CMAKE_CURRENT_SOURCE_DIR}/luac.c) | ||
option(LUA_STATIC "link lua statically" ON) | ||
if (LUA_STATIC) | ||
MESSAGE(STATUS "Lua linking: static") | ||
else() | ||
MESSAGE(STATUS "Lua linking: dynamic") | ||
endif() | ||
|
||
set(lua_STAT_SRCS | ||
${sources} | ||
) | ||
|
||
add_library(lualib STATIC ${lua_STAT_SRCS}) | ||
|
||
|
||
target_include_directories(lualib | ||
PUBLIC | ||
${CMAKE_CURRENT_SOURCE_DIR}) | ||
|
||
if(MSVC) | ||
set_target_properties(${LIBRARY_NAME} PROPERTIES FOLDER "Dependencies") | ||
endif() | ||
if (LUA_VERSION MATCHES "luajit") | ||
add_subdirectory(luajit) | ||
else() | ||
add_subdirectory(lua) | ||
endif() |
Oops, something went wrong.