fix vs2008/premake itself

Co-authored-by: penguin2233 <dm4.bade@gmail.com>
This commit is contained in:
NishiOwO 2025-04-13 22:16:00 +09:00
parent c654de4d3c
commit 9d662dc88b
No known key found for this signature in database
GPG Key ID: 27EF69B208EB9343
2 changed files with 14 additions and 10 deletions

View File

@ -204,6 +204,13 @@ function gf_link_stuffs(cond)
end
function gf_msvc_filters()
-- Manifest fix by penguin2233
require('vstudio')
premake.override(premake.vstudio.vc200x, "generateManifest", function(base, cfg, toolset)
if cfg.flags.NoManifest then
premake.w('GenerateManifest="false"')
end
end)
filter({})
characterset("MBCS")
for k,rt in ipairs({"Debug", "Release"}) do
@ -212,12 +219,8 @@ function gf_msvc_filters()
"options:engine=dynamic",
"configurations:" .. rt
})
linkoptions({"/MANIFEST"})
runtime(rt)
staticruntime("Off")
postbuildcommands({
"mt -manifest $(TargetDir)$(TargetName).dll.manifest -outputresource:$(TargetDir)$(TargetName).dll"
})
filter({
"options:cc=msc",
"options:engine=static",

View File

@ -36,6 +36,13 @@ newaction({
})
function msvc_filters()
-- Manifest fix by penguin2233
require('vstudio')
premake.override(premake.vstudio.vc200x, "generateManifest", function(base, cfg, toolset)
if cfg.flags.NoManifest then
premake.w('GenerateManifest="false"')
end
end)
filter({})
characterset("MBCS")
for k,rt in ipairs({"Debug", "Release"}) do
@ -44,7 +51,6 @@ function msvc_filters()
"options:engine=dynamic",
"configurations:" .. rt
})
linkoptions({"/MANIFEST"})
runtime(rt)
staticruntime("Off")
filter({
@ -52,14 +58,9 @@ function msvc_filters()
"options:engine=static",
"configurations:" .. rt
})
linkoptions({"/MANIFEST"})
runtime(rt)
staticruntime("On")
end
filter("options:cc=msc")
postbuildcommands({
"mt -manifest $(TargetDir)$(TargetName).exe.manifest -outputresource:$(TargetDir)$(TargetName).exe"
})
filter({})
end