summaryrefslogtreecommitdiffstats
path: root/lib/lua/CMakeLists.txt
diff options
context:
space:
mode:
authorJulian Laubstein <julianlaubstein@yahoo.de>2015-11-04 22:32:11 +0100
committerJulian Laubstein <julianlaubstein@yahoo.de>2015-11-04 23:25:00 +0100
commit9a7dd0a0770178529c704c08bc446e3533b1f3e5 (patch)
tree2ef6b11f07074c22d44b7f2396e3a96562376974 /lib/lua/CMakeLists.txt
parentMerge pull request #2597 from cuberite/faviconChange (diff)
downloadcuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar
cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.gz
cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.bz2
cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.lz
cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.xz
cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.tar.zst
cuberite-9a7dd0a0770178529c704c08bc446e3533b1f3e5.zip
Diffstat (limited to 'lib/lua/CMakeLists.txt')
m---------lib/lua0
-rw-r--r--lib/lua/CMakeLists.txt70
2 files changed, 0 insertions, 70 deletions
diff --git a/lib/lua b/lib/lua
new file mode 160000
+Subproject dd27acefcd98a28c68e686f414a42302113471f
diff --git a/lib/lua/CMakeLists.txt b/lib/lua/CMakeLists.txt
deleted file mode 100644
index 8017a7a3c..000000000
--- a/lib/lua/CMakeLists.txt
+++ /dev/null
@@ -1,70 +0,0 @@
-
-cmake_minimum_required (VERSION 2.8.2)
-project (lua)
-
-include_directories ("${PROJECT_SOURCE_DIR}/../../src/")
-
-file(GLOB SOURCE
- "src/*.c"
-)
-
-list(REMOVE_ITEM SOURCE "${PROJECT_SOURCE_DIR}/src/lua.c" "${PROJECT_SOURCE_DIR}/src/luac.c")
-
-# add headers to MSVC project files:
-if (MSVC)
- file(GLOB HEADERS "src/*.h")
- list(REMOVE_ITEM SOURCE "${PROJECT_SOURCE_DIR}/src/lua.h" "${PROJECT_SOURCE_DIR}/src/luac.h")
- set(SOURCE ${SOURCE} ${HEADERS})
- source_group("Sources" FILES ${SOURCE})
-endif()
-
-
-# Lua needs to be linked dynamically on Windows and statically on *nix, so that LuaRocks work
-if (WIN32)
- add_library(lua SHARED ${SOURCE})
- set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/Server)
-
- # Output the executable into the $/Server folder, so that Cuberite can find it:
- set(EXECUTABLE_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/Server)
- SET_TARGET_PROPERTIES(lua PROPERTIES
- ARCHIVE_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/Server
- ARCHIVE_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/Server
- ARCHIVE_OUTPUT_DIRECTORY_DEBUGPROFILE ${CMAKE_SOURCE_DIR}/Server
- ARCHIVE_OUTPUT_DIRECTORY_RELEASEPROFILE ${CMAKE_SOURCE_DIR}/Server
- LIBRARY_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/Server
- LIBRARY_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/Server
- LIBRARY_OUTPUT_DIRECTORY_DEBUGPROFILE ${CMAKE_SOURCE_DIR}/Server
- LIBRARY_OUTPUT_DIRECTORY_RELEASEPROFILE ${CMAKE_SOURCE_DIR}/Server
- RUNTIME_OUTPUT_DIRECTORY_DEBUG ${CMAKE_SOURCE_DIR}/Server
- RUNTIME_OUTPUT_DIRECTORY_RELEASE ${CMAKE_SOURCE_DIR}/Server
- RUNTIME_OUTPUT_DIRECTORY_DEBUGPROFILE ${CMAKE_SOURCE_DIR}/Server
- RUNTIME_OUTPUT_DIRECTORY_RELEASEPROFILE ${CMAKE_SOURCE_DIR}/Server
- )
-
- if (MSVC)
- # Remove SCL warnings, we expect this library to have been tested safe
- SET_TARGET_PROPERTIES(
- lua PROPERTIES COMPILE_FLAGS "-D_CRT_SECURE_NO_WARNINGS"
- )
- endif()
-
- set_target_properties(lua PROPERTIES OUTPUT_NAME "lua51" PREFIX "")
-
- # NOTE: The DLL for each configuration is stored at the same place, thus overwriting each other.
- # This is known, however such behavior is needed for LuaRocks - they always load "lua5.1.dll" or "lua51.dll"
- # We make it work by compiling to "lua51.dll" and providing a proxy-DLL "lua5.1.dll"
- # See http://lua-users.org/wiki/LuaProxyDllFour for details
-else()
- add_library(lua ${SOURCE})
-endif()
-
-
-# Tell Lua what dynamic loader to use (for LuaRocks):
-if (UNIX)
- add_definitions(-DLUA_USE_DLOPEN)
-endif()
-
-if (UNIX)
- target_link_libraries(lua m ${DYNAMIC_LOADER})
-endif()
-