diff options
Diffstat (limited to 'lib/sqlite/CMakeLists.txt')
-rw-r--r-- | lib/sqlite/CMakeLists.txt | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/lib/sqlite/CMakeLists.txt b/lib/sqlite/CMakeLists.txt index 0815127ef..993dac146 100644 --- a/lib/sqlite/CMakeLists.txt +++ b/lib/sqlite/CMakeLists.txt @@ -9,16 +9,27 @@ 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}) source_group("Sources" FILES ${SOURCE}) endif() +# FreeBSD requires us to define this to get POSIX 2001 standard +if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD") + add_flags_cxx(-D__POSIX_VISIBLE=200112) +endif() add_library(sqlite ${SOURCE}) +target_link_libraries(sqlite lua) if (UNIX) target_link_libraries(sqlite ${DYNAMIC_LOADER}) |