diff options
| author | OpportunityLiu <[email protected]> | 2019-07-15 09:47:32 +0800 |
|---|---|---|
| committer | OpportunityLiu <[email protected]> | 2019-07-15 09:47:32 +0800 |
| commit | 8f82eac730b6ce94706c067f33bc1b25068b4ae6 (patch) | |
| tree | 704a1fc72a2c458321e8d97704e74298ea5ba15f /xmake/plugins | |
| parent | af141620835a0e519c30916d45dade25e365a0e8 (diff) | |
add headerfiles
Diffstat (limited to 'xmake/plugins')
6 files changed, 13 insertions, 1 deletions
diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua index 4333e71ca..eb6c5850a 100644 --- a/xmake/plugins/project/vsxmake/getinfo.lua +++ b/xmake/plugins/project/vsxmake/getinfo.lua @@ -261,7 +261,7 @@ function main(outputdir, vsinfo) for _,target in pairs(targets) do target._sub2 = {} local dirs = {} - for _,f in ipairs(target.sourcefiles) do + for _,f in ipairs(table.join(target.sourcefiles, target.headerfiles)) do local dir = path.directory(f) target._sub2[f] = { diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters index 48428a006..c79ec740a 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/#target#.vcxproj.filters @@ -26,6 +26,9 @@ </None> </ItemGroup> <ItemGroup> +#Import(Include)# + </ItemGroup> + <ItemGroup> #Import(File.c)# </ItemGroup> <ItemGroup> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/Include(inc) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/Include(inc) new file mode 100644 index 000000000..17344346b --- /dev/null +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj.filters/Include(inc) @@ -0,0 +1,3 @@ + <ClInclude Include="#path#"> + <Filter>#dir#</Filter> + </ClInclude> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj index 734c2a9cb..d0e4e94d7 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/#target#.vcxproj @@ -35,6 +35,9 @@ Include="$(XmakeScriptDir)\xmake.lua" /> </ItemGroup> <ItemGroup> +#Import(Include)# + </ItemGroup> + <ItemGroup> #Import(File.c)# </ItemGroup> <ItemGroup> diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/Include(inc) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/Include(inc) new file mode 100644 index 000000000..0178e0f9a --- /dev/null +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/Include(inc) @@ -0,0 +1 @@ + <ClInclude Include="#path#" /> diff --git a/xmake/plugins/project/vsxmake/vsxmake.lua b/xmake/plugins/project/vsxmake/vsxmake.lua index 19ec2bfa6..cf91eb40e 100644 --- a/xmake/plugins/project/vsxmake/vsxmake.lua +++ b/xmake/plugins/project/vsxmake/vsxmake.lua @@ -100,6 +100,8 @@ function _buildparams(info, target, default) elseif args.filerc then local files = info._sub[target].sourcefiles table.insert(r, _filter_files(files, {".rc"})) + elseif args.inc then + table.insert(r, info._sub[target].headerfiles) end return r end |
