CheatMenuSA/tools/premake5.lua

147 lines
3.1 KiB
Lua
Raw Normal View History

2021-07-21 13:31:02 -04:00
----------------------------
2021-11-11 02:55:47 -05:00
-- Premake Project Generator
2021-07-21 13:31:02 -04:00
----------------------------
2021-11-11 02:55:47 -05:00
2021-07-21 13:31:02 -04:00
-- Environment vars
2021-11-11 02:55:47 -05:00
----------------------------
-- Should get picked up automatically if you installed them properly
2021-07-21 13:31:02 -04:00
PSDK_DIR = os.getenv("PLUGIN_SDK_DIR")
2022-06-05 17:18:41 -04:00
DX9SDK_DIR = os.getenv("DXSDK_DIR")
2021-07-21 13:31:02 -04:00
if (DX9SDK_DIR == nil) then
2022-06-05 17:18:41 -04:00
error("DXSDK_DIR environment variable not set")
2021-07-21 13:31:02 -04:00
end
if (PSDK_DIR == nil) then
error("PLUGIN_SDK_DIR environment variable not set")
end
2021-11-11 02:55:47 -05:00
2021-07-21 13:31:02 -04:00
----------------------------
function createProject(projectID)
upperID = string.upper(projectID)
pathExt = ""
if (projectID ~= "sa") then
pathExt = "_" .. projectID
end
project ("CheatMenu" .. upperID)
kind "SharedLib"
targetextension ".asi"
includedirs {
PSDK_DIR .. "/plugin_" .. projectID .. "/",
PSDK_DIR .. "/plugin_" .. projectID .. "/game_" .. projectID .. "/",
PSDK_DIR .. "/shared/",
PSDK_DIR .. "/shared/game/"
}
libdirs {
PSDK_DIR .. "/output/lib",
"lib"
}
files {
"../src/**.h",
"../src/**.hpp",
"../src/**.c",
"../src/**.cpp"
}
if (upperID ~= "SA") then
removefiles {
"../src/**_sa.c",
"../src/**_sa.hpp",
"../src/**_sa.cpp"
}
end
if upperID == "III" then
upperID = "3"
linkoptions {
"/FORCE:MULTIPLE"
}
end
defines {
"GTA" .. upperID,
}
pchheader "pch.h"
pchsource "../src/pch.cpp"
filter "configurations:Debug"
symbols "On"
links {
"depend",
"plugin" .. pathExt .. "_d.lib",
}
filter "configurations:Release"
optimize "On"
links {
"depend",
"plugin" .. pathExt.. ".lib",
}
end
2021-07-21 13:31:02 -04:00
workspace "CheatMenu"
2021-07-25 08:29:01 -04:00
configurations { "Debug", "Release" }
architecture "x86"
platforms "Win32"
language "C++"
cppdialect "C++20"
characterset "MBCS"
staticruntime "On"
location "../build"
2021-12-28 01:32:29 -05:00
targetdir "../build/bin"
2021-07-21 13:31:02 -04:00
2022-03-10 01:48:57 -05:00
libdirs {
2022-03-14 02:04:58 -04:00
PSDK_DIR .. "/output/lib"
2022-03-10 01:48:57 -05:00
}
2022-03-09 17:23:08 -05:00
links {
"d3d9",
"d3d11",
"Pdh",
2022-03-10 13:20:53 -05:00
"urlmon"
2022-03-10 08:06:57 -05:00
}
2021-10-21 18:23:02 -04:00
defines {
"IS_PLATFORM_WIN" ,
"_CRT_SECURE_NO_WARNINGS",
"_CRT_NON_CONFORMING_SWPRINTFS",
"_DX9_SDK_INSTALLED",
"PLUGIN_SGV_10US",
"_GTA_"
2021-10-21 18:23:02 -04:00
}
2021-08-01 21:41:48 -04:00
includedirs {
"../depend/",
"../src/",
2021-08-01 21:41:48 -04:00
}
project "depend"
kind "StaticLib"
2021-08-01 21:41:48 -04:00
2021-07-21 13:31:02 -04:00
files {
"../depend/**.h",
"../depend/**.hpp",
"../depend/**.c",
"../depend/**.cpp"
2021-07-21 13:31:02 -04:00
}
filter "configurations:Debug"
defines { "DEBUG" }
2021-07-21 13:31:02 -04:00
symbols "On"
filter "configurations:Release"
defines { "NDEBUG" }
2021-07-21 14:06:42 -04:00
optimize "On"
createProject("III")
createProject("sa")
createProject("vc")