diff options
author | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-11-05 10:56:20 +0100 |
---|---|---|
committer | Julian Laubstein <julianlaubstein@yahoo.de> | 2015-11-05 10:56:20 +0100 |
commit | 51e5e6e9a8ed689c044256859f16f1b1f57585b7 (patch) | |
tree | 3a0d2409a61622edcc3ec5953a28fb3c13cc8705 /lib/lua/CMakeLists.txt | |
parent | Merge pull request #2601 from Gargaj/patch-1 (diff) | |
parent | Outsourced all libraries into submodules (diff) | |
download | cuberite-51e5e6e9a8ed689c044256859f16f1b1f57585b7.tar cuberite-51e5e6e9a8ed689c044256859f16f1b1f57585b7.tar.gz cuberite-51e5e6e9a8ed689c044256859f16f1b1f57585b7.tar.bz2 cuberite-51e5e6e9a8ed689c044256859f16f1b1f57585b7.tar.lz cuberite-51e5e6e9a8ed689c044256859f16f1b1f57585b7.tar.xz cuberite-51e5e6e9a8ed689c044256859f16f1b1f57585b7.tar.zst cuberite-51e5e6e9a8ed689c044256859f16f1b1f57585b7.zip |
Diffstat (limited to 'lib/lua/CMakeLists.txt')
m--------- | lib/lua | 0 | ||||
-rw-r--r-- | lib/lua/CMakeLists.txt | 70 |
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() - |