mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-06-26 06:11:53 +00:00
refactor: cryptography component
This commit is contained in:
45
src/Cryptography.lua
Normal file
45
src/Cryptography.lua
Normal file
@ -0,0 +1,45 @@
|
||||
Cryptography = {}
|
||||
|
||||
function Cryptography:include(includes)
|
||||
if includes:handle(self:name()) then
|
||||
includedirs {
|
||||
path.join(ProjectFolder(), "Cryptography")
|
||||
}
|
||||
end
|
||||
end
|
||||
|
||||
function Cryptography:link(links)
|
||||
links:add(self:name())
|
||||
links:linkto(libtomcrypt)
|
||||
links:linkto(libtommath)
|
||||
links:linkto(salsa20)
|
||||
end
|
||||
|
||||
function Cryptography:use()
|
||||
|
||||
end
|
||||
|
||||
function Cryptography:name()
|
||||
return "Cryptography"
|
||||
end
|
||||
|
||||
function Cryptography:project()
|
||||
local folder = ProjectFolder()
|
||||
local includes = Includes:create()
|
||||
|
||||
project(self:name())
|
||||
targetdir(TargetDirectoryLib)
|
||||
location "%{wks.location}/src/%{prj.name}"
|
||||
kind "StaticLib"
|
||||
language "C++"
|
||||
|
||||
files {
|
||||
path.join(folder, "Cryptography/**.h"),
|
||||
path.join(folder, "Cryptography/**.cpp")
|
||||
}
|
||||
|
||||
self:include(includes)
|
||||
libtomcrypt:include(includes)
|
||||
libtommath:include(includes)
|
||||
salsa20:include(includes)
|
||||
end
|
Reference in New Issue
Block a user