1
0
cuberite-2a/lib/sqlite/CMakeLists.txt

37 lines
785 B
CMake
Raw Normal View History

2013-12-19 00:28:48 +00:00
cmake_minimum_required (VERSION 2.6)
project (sqlite)
include_directories ("${PROJECT_SOURCE_DIR}/../")
file(GLOB SOURCE
"*.c"
)
# 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
2014-05-28 20:39:28 +00:00
if (${CMAKE_SYSTEM_NAME} STREQUAL "FreeBSD")
add_flags_cxx(-D__POSIX_VISIBLE=200112)
endif()
2013-12-19 00:28:48 +00:00
add_library(sqlite ${SOURCE})
2014-07-01 06:01:39 +00:00
target_link_libraries(sqlite lua)
2013-12-19 00:28:48 +00:00
if (UNIX)
2014-07-01 06:01:39 +00:00
target_link_libraries(sqlite ${DYNAMIC_LOADER})
endif()