Cleanup of Visual Studio project generation (#12929)
Visual studio project file creation had some problems. Files with c extension were listed with cpp extension. Some include files that did not exist were added to the project. This change ensures a file exists before adding it to the project.
This commit is contained in:
parent
5fa7cf35b2
commit
b361f371f1
1 changed files with 6 additions and 3 deletions
|
@ -270,9 +270,12 @@ if selected_platform in platform_list:
|
|||
if len(pieces) > 0:
|
||||
basename = pieces[0]
|
||||
basename = basename.replace('\\\\', '/')
|
||||
env.vs_srcs = env.vs_srcs + [basename + ".cpp"]
|
||||
env.vs_incs = env.vs_incs + [basename + ".h"]
|
||||
# print basename
|
||||
if os.path.isfile(basename + ".h"):
|
||||
env.vs_incs = env.vs_incs + [basename + ".h"]
|
||||
if os.path.isfile(basename + ".c"):
|
||||
env.vs_srcs = env.vs_srcs + [basename + ".c"]
|
||||
elif os.path.isfile(basename + ".cpp"):
|
||||
env.vs_srcs = env.vs_srcs + [basename + ".cpp"]
|
||||
env.AddToVSProject = AddToVSProject
|
||||
|
||||
env.extra_suffix = ""
|
||||
|
|
Loading…
Reference in a new issue