mirror of
https://github.com/godotengine/godot.git
synced 2024-11-10 06:03:09 +00:00
Let VS solution name be overridden
This commit is contained in:
parent
d02a7bc00d
commit
ef6e21bf76
@ -200,6 +200,7 @@ opts.Add(EnumVariable("warnings", "Level of compilation warnings", "all", ("extr
|
||||
opts.Add(BoolVariable("werror", "Treat compiler warnings as errors", False))
|
||||
opts.Add("extra_suffix", "Custom extra suffix added to the base filename of all generated binary files", "")
|
||||
opts.Add(BoolVariable("vsproj", "Generate a Visual Studio solution", False))
|
||||
opts.Add("vsproj_name", "Name of the Visual Studio solution", "godot")
|
||||
opts.Add(BoolVariable("disable_3d", "Disable 3D nodes for a smaller executable", False))
|
||||
opts.Add(BoolVariable("disable_advanced_gui", "Disable advanced GUI nodes and behaviors", False))
|
||||
opts.Add("build_profile", "Path to a file containing a feature build profile", "")
|
||||
@ -923,7 +924,7 @@ if selected_platform in platform_list:
|
||||
print("Error: The `vsproj` option is only usable on Windows with Visual Studio.")
|
||||
Exit(255)
|
||||
env["CPPPATH"] = [Dir(path) for path in env["CPPPATH"]]
|
||||
methods.generate_vs_project(env, GetOption("num_jobs"))
|
||||
methods.generate_vs_project(env, GetOption("num_jobs"), env["vsproj_name"])
|
||||
methods.generate_cpp_hint_file("cpp.hint")
|
||||
|
||||
# Check for the existence of headers
|
||||
|
@ -732,7 +732,7 @@ def add_to_vs_project(env, sources):
|
||||
env.vs_srcs += [basename + ".cpp"]
|
||||
|
||||
|
||||
def generate_vs_project(env, num_jobs):
|
||||
def generate_vs_project(env, num_jobs, project_name="godot"):
|
||||
batch_file = find_visual_c_batch_file(env)
|
||||
if batch_file:
|
||||
|
||||
@ -873,7 +873,7 @@ def generate_vs_project(env, num_jobs):
|
||||
env["MSVS"]["PROJECTSUFFIX"] = ".vcxproj"
|
||||
env["MSVS"]["SOLUTIONSUFFIX"] = ".sln"
|
||||
env.MSVSProject(
|
||||
target=["#godot" + env["MSVSPROJECTSUFFIX"]],
|
||||
target=["#" + project_name + env["MSVSPROJECTSUFFIX"]],
|
||||
incs=env.vs_incs,
|
||||
srcs=env.vs_srcs,
|
||||
auto_build_solution=1,
|
||||
|
Loading…
Reference in New Issue
Block a user