mirror of
https://github.com/diamante0018/BlackOpsPlugin.git
synced 2025-07-05 02:32:11 +00:00
init
This commit is contained in:
94
premake5.lua
Normal file
94
premake5.lua
Normal file
@ -0,0 +1,94 @@
|
||||
dependencies = {
|
||||
basePath = "./deps"
|
||||
}
|
||||
|
||||
function dependencies.load()
|
||||
dir = path.join(dependencies.basePath, "premake/*.lua")
|
||||
deps = os.matchfiles(dir)
|
||||
|
||||
for i, dep in pairs(deps) do
|
||||
dep = dep:gsub(".lua", "")
|
||||
require(dep)
|
||||
end
|
||||
end
|
||||
|
||||
function dependencies.imports()
|
||||
for i, proj in pairs(dependencies) do
|
||||
if type(i) == 'number' then
|
||||
proj.import()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function dependencies.projects()
|
||||
for i, proj in pairs(dependencies) do
|
||||
if type(i) == 'number' then
|
||||
proj.project()
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
newoption {
|
||||
trigger = "copy-to",
|
||||
description = "Optional, copy the EXE to a custom folder after build, define the path here if wanted.",
|
||||
value = "PATH"
|
||||
}
|
||||
|
||||
dependencies.load()
|
||||
|
||||
workspace "black-ops-plugin"
|
||||
location "./build"
|
||||
objdir "%{wks.location}/obj"
|
||||
targetdir "%{wks.location}/bin/%{cfg.platform}/%{cfg.buildcfg}"
|
||||
targetname "%{prj.name}"
|
||||
|
||||
configurations {"Debug", "Release"}
|
||||
|
||||
language "C++"
|
||||
|
||||
architecture "x86"
|
||||
platforms "x86"
|
||||
|
||||
systemversion "latest"
|
||||
symbols "On"
|
||||
staticruntime "On"
|
||||
editandcontinue "Off"
|
||||
warnings "Extra"
|
||||
characterset "ASCII"
|
||||
|
||||
flags { "NoIncrementalLink", "NoMinimalRebuild", "MultiProcessorCompile", "No64BitChecks" }
|
||||
|
||||
filter "windows"
|
||||
defines {"_WINDOWS", "WIN32"}
|
||||
|
||||
filter "Release"
|
||||
optimize "Size"
|
||||
buildoptions {"/GL"}
|
||||
linkoptions { "/IGNORE:4702", "/LTCG" }
|
||||
|
||||
defines {"NDEBUG"}
|
||||
|
||||
flags {"FatalCompileWarnings"}
|
||||
|
||||
filter "Debug"
|
||||
optimize "Debug"
|
||||
|
||||
defines {"DEBUG", "_DEBUG"}
|
||||
|
||||
filter {}
|
||||
|
||||
project "black-ops-plugin"
|
||||
kind "StaticLib"
|
||||
language "C++"
|
||||
|
||||
files {"./src/**.hpp", "./src/**.cpp"}
|
||||
|
||||
includedirs {"src"}
|
||||
|
||||
dependencies.imports()
|
||||
|
||||
group "Dependencies"
|
||||
dependencies.projects()
|
||||
|
||||
workspace "*"
|
||||
cppdialect "C++20"
|
Reference in New Issue
Block a user