summaryrefslogtreecommitdiffstats
path: root/lib/lua/CMakeLists.txt
diff options
context:
space:
mode:
authorTycho <work.tycho+git@gmail.com>2014-06-14 18:19:28 +0200
committerTycho <work.tycho+git@gmail.com>2014-06-14 18:19:28 +0200
commit039c1a75f391b078f2b27a388e73bb203afed58e (patch)
treef4f213b794eb0c3a2713358c3d5bdd3f0b931486 /lib/lua/CMakeLists.txt
parentFixed bad merge (diff)
parentMerge pull request #1093 from mc-server/BindingsFix (diff)
downloadcuberite-039c1a75f391b078f2b27a388e73bb203afed58e.tar
cuberite-039c1a75f391b078f2b27a388e73bb203afed58e.tar.gz
cuberite-039c1a75f391b078f2b27a388e73bb203afed58e.tar.bz2
cuberite-039c1a75f391b078f2b27a388e73bb203afed58e.tar.lz
cuberite-039c1a75f391b078f2b27a388e73bb203afed58e.tar.xz
cuberite-039c1a75f391b078f2b27a388e73bb203afed58e.tar.zst
cuberite-039c1a75f391b078f2b27a388e73bb203afed58e.zip
Diffstat (limited to 'lib/lua/CMakeLists.txt')
-rw-r--r--lib/lua/CMakeLists.txt6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/lua/CMakeLists.txt b/lib/lua/CMakeLists.txt
index db112d557..6e5e0f565 100644
--- a/lib/lua/CMakeLists.txt
+++ b/lib/lua/CMakeLists.txt
@@ -20,6 +20,12 @@ endif()
# Lua needs to be linked dynamically on Windows and statically on *nix, so that LuaRocks work
if (WIN32)
+
+ #for compiliers other than msvc we need to tell lua that its building as a dll
+ if (NOT MSVC)
+ add_flags_cxx(-DLUA_BUILD_AS_DLL=1)
+ endif()
+
add_library(lua SHARED ${SOURCE})
set(LIBRARY_OUTPUT_PATH ${CMAKE_SOURCE_DIR}/MCServer)