diff options
Diffstat (limited to 'templates/vsprojects/vcxproj.filters_defs.include')
-rw-r--r-- | templates/vsprojects/vcxproj.filters_defs.include | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/templates/vsprojects/vcxproj.filters_defs.include b/templates/vsprojects/vcxproj.filters_defs.include index 787d66eeff..d1ebb56709 100644 --- a/templates/vsprojects/vcxproj.filters_defs.include +++ b/templates/vsprojects/vcxproj.filters_defs.include @@ -5,7 +5,7 @@ def calc_to_filter(path): return '\\'.join(path.split('/')[:-1]) %>\ -<%def name="get_repo_root()">..\..</%def>\ +<%def name="get_repo_root(proj)">${'..\..\..' + ('\..' if proj.vs_proj_dir != '.' else '')}</%def>\ <%def name="to_windows_path(path)">${path.replace('/','\\')}</%def>\ <%def name="to_filter(path)">${calc_to_filter(path)}</%def>\ <%def name="filter_to_guid(proj, filter)">${re.sub('(........)(....)(....)(....)', r'\1-\2-\3-\4-', hashlib.md5(''.join([filter, proj])).hexdigest())}</%def>\ @@ -17,7 +17,7 @@ % if project.get('src',[]): <ItemGroup> % for src_name in project.src: - <ClCompile Include="${get_repo_root()}\${to_windows_path(src_name)}"> + <ClCompile Include="${get_repo_root(project)}\${to_windows_path(src_name)}"> <Filter>${to_filter(src_name)}</Filter> </ClCompile> % endfor @@ -26,7 +26,7 @@ % if project.get('public_headers',[]): <ItemGroup> % for public_header in project.public_headers: - <ClInclude Include="${get_repo_root()}\${to_windows_path(public_header)}"> + <ClInclude Include="${get_repo_root(project)}\${to_windows_path(public_header)}"> <Filter>${to_filter(public_header)}</Filter> </ClInclude> % endfor @@ -35,7 +35,7 @@ % if project.get('headers',[]): <ItemGroup> % for header in project.headers: - <ClInclude Include="${get_repo_root()}\${to_windows_path(header)}"> + <ClInclude Include="${get_repo_root(project)}\${to_windows_path(header)}"> <Filter>${to_filter(header)}</Filter> </ClInclude> % endfor |