summaryrefslogtreecommitdiff
path: root/SConstruct
diff options
context:
space:
mode:
authorBartłomiej T. Listwon <blistwon@gmail.com>2020-09-19 16:39:11 +0200
committerBartłomiej T. Listwon <blistwon@gmail.com>2020-09-27 18:03:51 +0200
commit317c2b194d2a44f67f3cf42e5bb088343acfe033 (patch)
treef9ec6c3bc62e38c29886cc70eca1140968c2e66b /SConstruct
parent84cec777c14f5d6bc3fbed425906211044429380 (diff)
Add all headers to VS Project
Diffstat (limited to 'SConstruct')
-rw-r--r--SConstruct29
1 files changed, 4 insertions, 25 deletions
diff --git a/SConstruct b/SConstruct
index b7b0321039..e38e0dc231 100644
--- a/SConstruct
+++ b/SConstruct
@@ -320,31 +320,6 @@ if selected_platform in platform_list:
if env["tools"]:
env["tests"] = True
- if env["vsproj"]:
- env.vs_incs = []
- env.vs_srcs = []
-
- def AddToVSProject(sources):
- for x in sources:
- if type(x) == type(""):
- fname = env.File(x).path
- else:
- fname = env.File(x)[0].path
- pieces = fname.split(".")
- if len(pieces) > 0:
- basename = pieces[0]
- basename = basename.replace("\\\\", "/")
- if os.path.isfile(basename + ".h"):
- env.vs_incs = env.vs_incs + [basename + ".h"]
- elif os.path.isfile(basename + ".hpp"):
- env.vs_incs = env.vs_incs + [basename + ".hpp"]
- 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 = ""
if env["extra_suffix"] != "":
@@ -646,6 +621,10 @@ if selected_platform in platform_list:
CacheDir(scons_cache_path)
print("Scons cache enabled... (path: '" + scons_cache_path + "')")
+ if env["vsproj"]:
+ env.vs_incs = []
+ env.vs_srcs = []
+
Export("env")
# Build subdirs, the build order is dependent on link order.