Browse Source

SCons: Fix `RES` race condition

Thaddeus Crews 1 year ago
parent
commit
18fb492afe
1 changed files with 2 additions and 0 deletions
  1. 2 0
      platform/windows/SCsub

+ 2 - 0
platform/windows/SCsub

@@ -50,6 +50,7 @@ def arrange_program_clean(prog):
 res_file = "godot_res.rc"
 res_file = "godot_res.rc"
 res_target = "godot_res" + env["OBJSUFFIX"]
 res_target = "godot_res" + env["OBJSUFFIX"]
 res_obj = env.RES(res_target, res_file)
 res_obj = env.RES(res_target, res_file)
+env.Depends(res_obj, "#core/version_generated.gen.h")
 
 
 env.add_source_files(sources, common_win)
 env.add_source_files(sources, common_win)
 sources += res_obj
 sources += res_obj
@@ -63,6 +64,7 @@ if env["windows_subsystem"] == "gui":
     res_wrap_file = "godot_res_wrap.rc"
     res_wrap_file = "godot_res_wrap.rc"
     res_wrap_target = "godot_res_wrap" + env["OBJSUFFIX"]
     res_wrap_target = "godot_res_wrap" + env["OBJSUFFIX"]
     res_wrap_obj = env_wrap.RES(res_wrap_target, res_wrap_file)
     res_wrap_obj = env_wrap.RES(res_wrap_target, res_wrap_file)
+    env_wrap.Depends(res_wrap_obj, "#core/version_generated.gen.h")
 
 
     if env.msvc:
     if env.msvc:
         env_wrap.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"])
         env_wrap.Append(LINKFLAGS=["/SUBSYSTEM:CONSOLE"])