2016-08-25 12:17:47 -04:00
|
|
|
bitmrc = {
|
|
|
|
settings = nil,
|
|
|
|
}
|
|
|
|
|
|
|
|
function bitmrc.setup(settings)
|
|
|
|
if not settings.source then error("Missing source.") end
|
|
|
|
|
|
|
|
bitmrc.settings = settings
|
|
|
|
end
|
|
|
|
|
|
|
|
function bitmrc.import()
|
|
|
|
if not bitmrc.settings then error("Run bitmrc.setup first") end
|
|
|
|
|
2016-08-26 17:41:01 -04:00
|
|
|
sqlite3.links()
|
|
|
|
libcryptopp.links()
|
2016-08-26 15:38:13 -04:00
|
|
|
bitmrc.links()
|
2016-08-25 12:17:47 -04:00
|
|
|
bitmrc.includes()
|
|
|
|
end
|
|
|
|
|
2016-08-26 15:38:13 -04:00
|
|
|
function bitmrc.links()
|
|
|
|
links { "bitmrc" }
|
|
|
|
end
|
|
|
|
|
2016-08-25 12:17:47 -04:00
|
|
|
function bitmrc.includes()
|
|
|
|
if not bitmrc.settings then error("Run bitmrc.setup first") end
|
|
|
|
|
|
|
|
includedirs { path.join(bitmrc.settings.source, "BitMRC/include") }
|
|
|
|
end
|
|
|
|
|
|
|
|
function bitmrc.project()
|
|
|
|
if not bitmrc.settings then error("Run bitmrc.setup first") end
|
|
|
|
|
|
|
|
project "bitmrc"
|
|
|
|
language "C++"
|
|
|
|
|
|
|
|
includedirs
|
|
|
|
{
|
2016-08-25 12:38:45 -04:00
|
|
|
path.join(bitmrc.settings.source, "BitMRC/include"),
|
2016-08-26 14:51:20 -04:00
|
|
|
path.join(bitmrc.settings.source, "BitMRC/Storage/include"),
|
2016-08-25 12:17:47 -04:00
|
|
|
}
|
|
|
|
files
|
|
|
|
{
|
2016-08-26 14:51:20 -04:00
|
|
|
path.join(bitmrc.settings.source, "BitMRC/*.cpp"),
|
|
|
|
path.join(bitmrc.settings.source, "BitMRC/Storage/*.cpp"),
|
2016-08-25 12:17:47 -04:00
|
|
|
}
|
|
|
|
removefiles
|
|
|
|
{
|
|
|
|
-- path.join(bitmrc.settings.source, "src/**/*test.cc"),
|
2016-08-26 14:51:20 -04:00
|
|
|
path.join(bitmrc.settings.source, "BitMRC/main.*"),
|
|
|
|
path.join(bitmrc.settings.source, "BitMRC/class.*"),
|
2016-08-25 12:38:45 -04:00
|
|
|
path.join(bitmrc.settings.source, "BitMRC/tests/**"),
|
2016-08-25 12:17:47 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
-- dependencies
|
2016-08-26 14:51:20 -04:00
|
|
|
sqlite3.import()
|
2016-08-25 12:17:47 -04:00
|
|
|
libcryptopp.import()
|
|
|
|
|
|
|
|
defines { "_SCL_SECURE_NO_WARNINGS" }
|
|
|
|
warnings "Off"
|
|
|
|
|
|
|
|
kind "StaticLib"
|
|
|
|
end
|