summaryrefslogtreecommitdiffstats
path: root/lib/sqlite/CMakeLists.txt
diff options
context:
space:
mode:
authorMattes D <github@xoft.cz>2014-07-01 15:07:12 +0200
committerMattes D <github@xoft.cz>2014-07-01 15:07:12 +0200
commit9d843405b282937f9ee70e6ad066ce65a23a02a5 (patch)
treed7ad93182d00f62766e75fa7611d273dd4ff3d34 /lib/sqlite/CMakeLists.txt
parentAdded a missing endline. (diff)
parentMerge pull request #1140 from mc-server/FixMingw (diff)
downloadcuberite-9d843405b282937f9ee70e6ad066ce65a23a02a5.tar
cuberite-9d843405b282937f9ee70e6ad066ce65a23a02a5.tar.gz
cuberite-9d843405b282937f9ee70e6ad066ce65a23a02a5.tar.bz2
cuberite-9d843405b282937f9ee70e6ad066ce65a23a02a5.tar.lz
cuberite-9d843405b282937f9ee70e6ad066ce65a23a02a5.tar.xz
cuberite-9d843405b282937f9ee70e6ad066ce65a23a02a5.tar.zst
cuberite-9d843405b282937f9ee70e6ad066ce65a23a02a5.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})