summaryrefslogtreecommitdiffstats
path: root/lib/sqlite/CMakeLists.txt
diff options
context:
space:
mode:
authorHowaner <franzi.moos@googlemail.com>2014-07-13 00:54:11 +0200
committerHowaner <franzi.moos@googlemail.com>2014-07-13 00:54:11 +0200
commit4b093972ea139d057dd523b583352be69bae7edb (patch)
tree1bc8edf1594f4c81bbdd6a68cf7d22f5a2b21341 /lib/sqlite/CMakeLists.txt
parentAdd doxy-comments. (diff)
parentMerge pull request #1154 from mc-server/trappedchests (diff)
downloadcuberite-4b093972ea139d057dd523b583352be69bae7edb.tar
cuberite-4b093972ea139d057dd523b583352be69bae7edb.tar.gz
cuberite-4b093972ea139d057dd523b583352be69bae7edb.tar.bz2
cuberite-4b093972ea139d057dd523b583352be69bae7edb.tar.lz
cuberite-4b093972ea139d057dd523b583352be69bae7edb.tar.xz
cuberite-4b093972ea139d057dd523b583352be69bae7edb.tar.zst
cuberite-4b093972ea139d057dd523b583352be69bae7edb.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})