mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-19 07:42:54 +00:00
Add premake solution generation for third party projects for now only
This commit is contained in:
parent
fb3b62fa69
commit
debb8d481e
6
.gitignore
vendored
6
.gitignore
vendored
@ -16,9 +16,7 @@ ipch/*
|
||||
|
||||
.vs/
|
||||
bin/
|
||||
lib/
|
||||
obj/
|
||||
local/
|
||||
gen/
|
||||
obj/
|
||||
packages/
|
||||
TestResults/
|
||||
build/
|
1
generate.bat
Normal file
1
generate.bat
Normal file
@ -0,0 +1 @@
|
||||
tools\premake5 vs2019
|
86
premake5.lua
Normal file
86
premake5.lua
Normal file
@ -0,0 +1,86 @@
|
||||
-- Functions for locating commonly used folders
|
||||
local _ThirdPartyFolder = path.getabsolute("thirdparty")
|
||||
function ThirdPartyFolder()
|
||||
return path.getrelative(os.getcwd(), _ThirdPartyFolder)
|
||||
end
|
||||
|
||||
local _ProjectFolder = path.getabsolute("src")
|
||||
function ProjectFolder()
|
||||
return path.getrelative(os.getcwd(), _ProjectFolder)
|
||||
end
|
||||
|
||||
local _TestFolder = path.getabsolute("test")
|
||||
function TestFolder()
|
||||
return path.getrelative(os.getcwd(), _TestFolder)
|
||||
end
|
||||
|
||||
-- Target Directories
|
||||
TargetDirectoryBin = "%{wks.location}/bin/%{cfg.buildcfg}_%{cfg.platform}"
|
||||
TargetDirectoryLib = "%{wks.location}/lib/%{cfg.buildcfg}_%{cfg.platform}"
|
||||
TargetDirectoryTest = "%{wks.location}/lib/%{cfg.buildcfg}_%{cfg.platform}/tests"
|
||||
|
||||
-- ==================
|
||||
-- Workspace
|
||||
-- ==================
|
||||
workspace "OpenAssetTools"
|
||||
location "build"
|
||||
objdir "%{wks.location}/obj"
|
||||
symbols "On"
|
||||
systemversion "latest"
|
||||
|
||||
flags {
|
||||
"MultiProcessorCompile"
|
||||
}
|
||||
|
||||
configurations {
|
||||
"Debug",
|
||||
"Release"
|
||||
}
|
||||
|
||||
platforms {
|
||||
"x86",
|
||||
"x64"
|
||||
}
|
||||
|
||||
filter "platforms:x86"
|
||||
architecture "x86"
|
||||
defines "ARCH_x86"
|
||||
filter {}
|
||||
|
||||
filter "platforms:x64"
|
||||
architecture "x86_64"
|
||||
defines "ARCH_x64"
|
||||
filter {}
|
||||
|
||||
filter "configurations:Debug"
|
||||
defines "_DEBUG"
|
||||
optimize "Debug"
|
||||
filter {}
|
||||
|
||||
filter "configurations:Release"
|
||||
defines "NDEBUG"
|
||||
optimize "Full"
|
||||
flags {
|
||||
"FatalWarnings"
|
||||
}
|
||||
filter {}
|
||||
|
||||
-- ========================
|
||||
-- ThirdParty
|
||||
-- ========================
|
||||
|
||||
include "thirdparty/libtomcrypt.lua"
|
||||
include "thirdparty/libtommath.lua"
|
||||
include "thirdparty/salsa20.lua"
|
||||
include "thirdparty/zlib.lua"
|
||||
|
||||
-- All projects here should be in the thirdparty folder
|
||||
group "thirdparty"
|
||||
|
||||
libtommath:project()
|
||||
libtomcrypt:project()
|
||||
salsa20:project()
|
||||
zlib:project()
|
||||
|
||||
-- Reset group
|
||||
group ""
|
43
thirdparty/libtomcrypt.lua
vendored
Normal file
43
thirdparty/libtomcrypt.lua
vendored
Normal file
@ -0,0 +1,43 @@
|
||||
libtomcrypt = {}
|
||||
|
||||
function libtomcrypt:include()
|
||||
includedirs {
|
||||
path.join(ThirdPartyFolder(), "libtomcrypt/src/headers")
|
||||
}
|
||||
end
|
||||
|
||||
function libtomcrypt:link()
|
||||
self:include()
|
||||
links {
|
||||
"libtomcrypt"
|
||||
}
|
||||
end
|
||||
|
||||
function libtomcrypt:project()
|
||||
local folder = ThirdPartyFolder();
|
||||
|
||||
project "libtomcrypt"
|
||||
targetdir(TargetDirectoryLib)
|
||||
location "%{wks.location}/thirdparty"
|
||||
kind "StaticLib"
|
||||
language "C"
|
||||
|
||||
files {
|
||||
path.join(folder, "libtomcrypt/src/**.h"),
|
||||
path.join(folder, "libtomcrypt/src/**.c")
|
||||
}
|
||||
|
||||
defines {
|
||||
"_CRT_SECURE_NO_WARNINGS",
|
||||
"_CRT_NONSTDC_NO_DEPRECATE",
|
||||
"LTC_SOURCE",
|
||||
"LTC_NO_TEST",
|
||||
"LTC_NO_PROTOTYPES"
|
||||
}
|
||||
|
||||
self:include()
|
||||
libtommath:include()
|
||||
|
||||
-- Disable warnings. They do not have any value to us since it is not our code.
|
||||
warnings "off"
|
||||
end
|
34
thirdparty/libtommath.lua
vendored
Normal file
34
thirdparty/libtommath.lua
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
libtommath = {}
|
||||
|
||||
function libtommath:include()
|
||||
includedirs {
|
||||
path.join(ThirdPartyFolder(), "libtommath")
|
||||
}
|
||||
end
|
||||
|
||||
function libtommath:link()
|
||||
self:include()
|
||||
links {
|
||||
"libtommath"
|
||||
}
|
||||
end
|
||||
|
||||
function libtommath:project()
|
||||
local folder = ThirdPartyFolder();
|
||||
|
||||
project "libtommath"
|
||||
targetdir(TargetDirectoryLib)
|
||||
location "%{wks.location}/thirdparty"
|
||||
kind "StaticLib"
|
||||
language "C"
|
||||
|
||||
files {
|
||||
path.join(folder, "libtommath/*.h"),
|
||||
path.join(folder, "libtommath/*.c")
|
||||
}
|
||||
|
||||
self:include()
|
||||
|
||||
-- Disable warnings. They do not have any value to us since it is not our code.
|
||||
warnings "off"
|
||||
end
|
34
thirdparty/salsa20.lua
vendored
Normal file
34
thirdparty/salsa20.lua
vendored
Normal file
@ -0,0 +1,34 @@
|
||||
salsa20 = {}
|
||||
|
||||
function salsa20:include()
|
||||
includedirs {
|
||||
path.join(ThirdPartyFolder(), "salsa20")
|
||||
}
|
||||
end
|
||||
|
||||
function salsa20:link()
|
||||
self:include()
|
||||
links {
|
||||
"salsa20"
|
||||
}
|
||||
end
|
||||
|
||||
function salsa20:project()
|
||||
local folder = ThirdPartyFolder();
|
||||
|
||||
project "salsa20"
|
||||
targetdir(TargetDirectoryLib)
|
||||
location "%{wks.location}/thirdparty"
|
||||
kind "StaticLib"
|
||||
language "C"
|
||||
|
||||
files {
|
||||
path.join(folder, "salsa20/*.h"),
|
||||
path.join(folder, "salsa20/*.c")
|
||||
}
|
||||
|
||||
self:include()
|
||||
|
||||
-- Disable warnings. They do not have any value to us since it is not our code.
|
||||
warnings "off"
|
||||
end
|
39
thirdparty/zlib.lua
vendored
Normal file
39
thirdparty/zlib.lua
vendored
Normal file
@ -0,0 +1,39 @@
|
||||
zlib = {}
|
||||
|
||||
function zlib:include()
|
||||
includedirs {
|
||||
path.join(ThirdPartyFolder(), "zlib")
|
||||
}
|
||||
end
|
||||
|
||||
function zlib:link()
|
||||
self:include()
|
||||
links {
|
||||
"zlib"
|
||||
}
|
||||
end
|
||||
|
||||
function zlib:project()
|
||||
local folder = ThirdPartyFolder();
|
||||
|
||||
project "zlib"
|
||||
targetdir(TargetDirectoryLib)
|
||||
location "%{wks.location}/thirdparty"
|
||||
kind "StaticLib"
|
||||
language "C"
|
||||
|
||||
files {
|
||||
path.join(folder, "zlib/*.h"),
|
||||
path.join(folder, "zlib/*.c")
|
||||
}
|
||||
|
||||
defines {
|
||||
"_CRT_SECURE_NO_WARNINGS",
|
||||
"_CRT_NONSTDC_NO_DEPRECATE"
|
||||
}
|
||||
|
||||
self:include()
|
||||
|
||||
-- Disable warnings. They do not have any value to us since it is not our code.
|
||||
warnings "off"
|
||||
end
|
BIN
tools/premake5.exe
Normal file
BIN
tools/premake5.exe
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user