2016-08-26 14:51:20 -04:00
|
|
|
sqlite3 = {
|
|
|
|
settings = nil,
|
|
|
|
}
|
|
|
|
|
|
|
|
function sqlite3.setup(settings)
|
|
|
|
if not settings.source then error("Missing source.") end
|
|
|
|
|
|
|
|
sqlite3.settings = settings
|
|
|
|
end
|
|
|
|
|
|
|
|
function sqlite3.import()
|
|
|
|
if not sqlite3.settings then error("Run sqlite3.setup first") end
|
|
|
|
|
|
|
|
sqlite3.includes()
|
2016-08-26 16:46:37 -04:00
|
|
|
sqlite3.links()
|
|
|
|
end
|
|
|
|
|
|
|
|
function sqlite3.links()
|
|
|
|
links { "sqlite3" }
|
2016-08-26 14:51:20 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
function sqlite3.includes()
|
|
|
|
if not sqlite3.settings then error("Run sqlite3.setup first") end
|
|
|
|
|
|
|
|
includedirs { sqlite3.settings.source }
|
|
|
|
end
|
|
|
|
|
|
|
|
function sqlite3.project()
|
|
|
|
if not sqlite3.settings then error("Run sqlite3.setup first") end
|
|
|
|
|
|
|
|
project "sqlite3"
|
|
|
|
language "C++"
|
|
|
|
|
|
|
|
includedirs
|
|
|
|
{
|
|
|
|
sqlite3.settings.source,
|
|
|
|
}
|
|
|
|
|
|
|
|
files
|
|
|
|
{
|
2016-08-26 16:46:37 -04:00
|
|
|
path.join(sqlite3.settings.source, "sqlite3*.c"),
|
|
|
|
path.join(sqlite3.settings.source, "sqlite3*.h"),
|
2016-08-26 14:51:20 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
-- not our code, ignore POSIX usage warnings for now
|
|
|
|
warnings "Off"
|
|
|
|
|
2016-08-30 12:31:57 -04:00
|
|
|
--kind "SharedLib"
|
|
|
|
--filter "*Static"
|
2016-08-26 14:51:20 -04:00
|
|
|
kind "StaticLib"
|
2016-08-30 12:31:57 -04:00
|
|
|
--filter "kind:StaticLib"
|
|
|
|
-- defines { "_LIB" }
|
|
|
|
-- removedefines { "_USRDLL", "_DLL" }
|
2016-08-26 14:51:20 -04:00
|
|
|
end
|