summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormclee <[email protected]>2019-08-14 17:25:39 +0800
committermclee <[email protected]>2019-08-14 17:25:39 +0800
commit4c9584aa6fec4b7ec7ffe70b6bc5789f41496941 (patch)
treebafc8ee566d31aa7c0b31d78f0f2c2fb30476cd3
parent4a6c8223a06325e0286ca4d7f79e954565d77828 (diff)
provide sources path for vs searching
-rw-r--r--xmake/plugins/project/vsxmake/getinfo.lua1
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/Xmake.props1
-rw-r--r--xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakePath(mode,arch)1
3 files changed, 3 insertions, 0 deletions
diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua
index 906148fa2..1dd444868 100644
--- a/xmake/plugins/project/vsxmake/getinfo.lua
+++ b/xmake/plugins/project/vsxmake/getinfo.lua
@@ -158,6 +158,7 @@ function _make_targetinfo(mode, arch, target)
targetinfo.configfiledir = _make_dirs(target:get("configdir"))
targetinfo.includedirs = _make_dirs(_get_values(target, "includedirs"))
targetinfo.linkdirs = _make_dirs(_get_values(target, "linkdirs"))
+ targetinfo.vcsourcepaths = _make_dirs(config.get("vcsourcepaths"))
-- save defines
targetinfo.defines = _make_arrs(_get_values(target, "defines"))
diff --git a/xmake/plugins/project/vsxmake/vsproj/Xmake.props b/xmake/plugins/project/vsxmake/vsproj/Xmake.props
index a8480c1da..07c25eb22 100644
--- a/xmake/plugins/project/vsxmake/vsproj/Xmake.props
+++ b/xmake/plugins/project/vsxmake/vsproj/Xmake.props
@@ -124,6 +124,7 @@
<LibraryPath>$(XmakeLinkDir);$(LibraryPath)</LibraryPath>
<OutDir>$(XmakeTargetDir)\</OutDir>
<IntDir>$(XmakeBuilDir)\.vs\$(TargetName)\$(XmakeArch)\$(XmakeMode)\</IntDir>
+ <SourcePath>$(VC_SourcePath);$(XmakeVCSourcePaths);</SourcePath>
</PropertyGroup>
<PropertyGroup Label="Debugger">
diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakePath(mode,arch) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakePath(mode,arch)
index 42644b1f5..bc3c028b9 100644
--- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakePath(mode,arch)
+++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakePath(mode,arch)
@@ -6,4 +6,5 @@
<XmakeIncludeDir>#includedirs#</XmakeIncludeDir>
<XmakeLinkDir>#linkdirs#</XmakeLinkDir>
<XmakeRunDir>#rundir#</XmakeRunDir>
+ <XmakeVCSourcePaths>#vcsourcepaths#</XmakeVCSourcePaths>
</PropertyGroup>