aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicolas Schneider <nioncode+git@gmail.com>2019-02-03 19:38:20 +0100
committerJussi Pakkanen <jpakkane@gmail.com>2019-02-04 20:27:57 +0100
commitc1fa61b7d9361d563e22b48974b55a188b7e9d70 (patch)
treeeaefbf604926ca0b7b28dd02adda2a5804fb5e8a
parent1bd14b52b26b0f4ec207bf7e38813b82bfc15f86 (diff)
downloadmeson-c1fa61b7d9361d563e22b48974b55a188b7e9d70.zip
meson-c1fa61b7d9361d563e22b48974b55a188b7e9d70.tar.gz
meson-c1fa61b7d9361d563e22b48974b55a188b7e9d70.tar.bz2
vs: add PCH headers to project
Otherwise, they will not be visible in the IDE.
-rw-r--r--mesonbuild/backend/vs2010backend.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py
index 783ae64..621aa1a 100644
--- a/mesonbuild/backend/vs2010backend.py
+++ b/mesonbuild/backend/vs2010backend.py
@@ -1153,7 +1153,7 @@ class Vs2010Backend(backends.Backend):
ET.SubElement(meson_file_group, 'None', Include=os.path.join(proj_to_src_dir, build_filename))
extra_files = target.extra_files
- if len(headers) + len(gen_hdrs) + len(extra_files) > 0:
+ if len(headers) + len(gen_hdrs) + len(extra_files) + len(pch_sources) > 0:
inc_hdrs = ET.SubElement(root, 'ItemGroup')
for h in headers:
relpath = os.path.join(down, h.rel_to_builddir(self.build_to_src))
@@ -1163,6 +1163,9 @@ class Vs2010Backend(backends.Backend):
for h in target.extra_files:
relpath = os.path.join(down, h.rel_to_builddir(self.build_to_src))
ET.SubElement(inc_hdrs, 'CLInclude', Include=relpath)
+ for lang in pch_sources:
+ h = pch_sources[lang][0]
+ ET.SubElement(inc_hdrs, 'CLInclude', Include=os.path.join(proj_to_src_dir, h))
if len(sources) + len(gen_src) + len(pch_sources) > 0:
inc_src = ET.SubElement(root, 'ItemGroup')