diff options
author | Vili Väinölä <vilivainola@gmail.com> | 2020-09-13 07:52:56 +0300 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek.chauhan@gmail.com> | 2020-09-13 06:27:00 +0000 |
commit | 25ad10e501ba11a017a63404756a1e796427b118 (patch) | |
tree | 9cbca9b97db4465ff641bcab0f4ec8d76971bc74 | |
parent | 1945f381b21efb40ca1411c0ffb6ea76dd835e27 (diff) | |
download | meson-25ad10e501ba11a017a63404756a1e796427b118.zip meson-25ad10e501ba11a017a63404756a1e796427b118.tar.gz meson-25ad10e501ba11a017a63404756a1e796427b118.tar.bz2 |
Add VS include directories to projects as well
- "Go To Document" action previously only worked
on c/cpp files which had the include directories
set but it was not possible to move from header to another header.
-rw-r--r-- | mesonbuild/backend/vs2010backend.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mesonbuild/backend/vs2010backend.py b/mesonbuild/backend/vs2010backend.py index 4fc3d5c..4e95c80 100644 --- a/mesonbuild/backend/vs2010backend.py +++ b/mesonbuild/backend/vs2010backend.py @@ -996,6 +996,9 @@ class Vs2010Backend(backends.Backend): # De-dup if inc_dir not in file_inc_dirs[l]: file_inc_dirs[l].append(inc_dir) + # Add include dirs to target as well so that "Go to Document" works in headers + if inc_dir not in target_inc_dirs: + target_inc_dirs.append(inc_dir) # Split compile args needed to find external dependencies # Link args are added while generating the link command @@ -1025,8 +1028,6 @@ class Vs2010Backend(backends.Backend): if len(target_args) > 0: target_args.append('%(AdditionalOptions)') ET.SubElement(clconf, "AdditionalOptions").text = ' '.join(target_args) - - target_inc_dirs.append('%(AdditionalIncludeDirectories)') ET.SubElement(clconf, 'AdditionalIncludeDirectories').text = ';'.join(target_inc_dirs) target_defines.append('%(PreprocessorDefinitions)') ET.SubElement(clconf, 'PreprocessorDefinitions').text = ';'.join(target_defines) |