summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-07-01 06:40:38 +0200
committerMattes D <github@xoft.cz>2014-07-01 06:40:38 +0200
commit4f60f5aef4517d6d3eaf2ea9f7aae30e6a97da25 (patch)
treeddbfeaa3d294827bbfe0faa26f8ba5b4e02e625a
parenttypo (diff)
downloadcuberite-4f60f5aef4517d6d3eaf2ea9f7aae30e6a97da25.tar
cuberite-4f60f5aef4517d6d3eaf2ea9f7aae30e6a97da25.tar.gz
cuberite-4f60f5aef4517d6d3eaf2ea9f7aae30e6a97da25.tar.bz2
cuberite-4f60f5aef4517d6d3eaf2ea9f7aae30e6a97da25.tar.lz
cuberite-4f60f5aef4517d6d3eaf2ea9f7aae30e6a97da25.tar.xz
cuberite-4f60f5aef4517d6d3eaf2ea9f7aae30e6a97da25.tar.zst
cuberite-4f60f5aef4517d6d3eaf2ea9f7aae30e6a97da25.zip
-rw-r--r--lib/sqlite/CMakeLists.txt10
-rw-r--r--src/CMakeLists.txt2
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/sqlite/CMakeLists.txt b/lib/sqlite/CMakeLists.txt
index 9add2280b..48bb5f15c 100644
--- a/lib/sqlite/CMakeLists.txt
+++ b/lib/sqlite/CMakeLists.txt
@@ -9,8 +9,14 @@ file(GLOB SOURCE
)
-# add headers to MSVC project files:
+# Lua is required as a DLL for LuaSQLite:
if (WIN32)
+ add_definitions(-DLUA_BUILD_AS_DLL)
+endif()
+
+
+# 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})
@@ -25,5 +31,5 @@ endif()
add_library(sqlite ${SOURCE})
if (UNIX)
- target_link_libraries(sqlite ${DYNAMIC_LOADER})
+ target_link_libraries(sqlite ${DYNAMIC_LOADER} lua)
endif()
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 2f4d6ea13..b1b880b7b 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -261,4 +261,4 @@ endif ()
if (WIN32)
target_link_libraries(${EXECUTABLE} expat tolualib ws2_32.lib Psapi.lib)
endif()
-target_link_libraries(${EXECUTABLE} luaexpat iniFile jsoncpp polarssl zlib lua sqlite)
+target_link_libraries(${EXECUTABLE} luaexpat iniFile jsoncpp polarssl zlib sqlite lua)