summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-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)