summaryrefslogtreecommitdiffstats
path: root/lib/sqlite/CMakeLists.txt
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-07-01 08:54:44 +0200
committerMattes D <github@xoft.cz>2014-07-01 08:54:44 +0200
commit24c86df12ecf69ae3ddaf707b2116b73c45402cc (patch)
tree92fe7519642865c344f5efcd974208ac11daea2a /lib/sqlite/CMakeLists.txt
parentFixed cFile compilation under MinGW. (diff)
parentProper sqlite dependency fix. (diff)
downloadcuberite-24c86df12ecf69ae3ddaf707b2116b73c45402cc.tar
cuberite-24c86df12ecf69ae3ddaf707b2116b73c45402cc.tar.gz
cuberite-24c86df12ecf69ae3ddaf707b2116b73c45402cc.tar.bz2
cuberite-24c86df12ecf69ae3ddaf707b2116b73c45402cc.tar.lz
cuberite-24c86df12ecf69ae3ddaf707b2116b73c45402cc.tar.xz
cuberite-24c86df12ecf69ae3ddaf707b2116b73c45402cc.tar.zst
cuberite-24c86df12ecf69ae3ddaf707b2116b73c45402cc.zip
Diffstat (limited to 'lib/sqlite/CMakeLists.txt')
-rw-r--r--lib/sqlite/CMakeLists.txt9
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/sqlite/CMakeLists.txt b/lib/sqlite/CMakeLists.txt
index 9add2280b..993dac146 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})
@@ -23,6 +29,7 @@ if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
endif()
add_library(sqlite ${SOURCE})
+target_link_libraries(sqlite lua)
if (UNIX)
target_link_libraries(sqlite ${DYNAMIC_LOADER})