From 786c94fb869b6bbcf310e93f3068b795b177fc0b Mon Sep 17 00:00:00 2001 From: OpportunityLiu Date: Wed, 14 Aug 2019 22:30:31 +0800 Subject: Add `XmakeSourceDirs`, add `s` for some props --- xmake/plugins/project/vsxmake/getinfo.lua | 4 ++-- xmake/plugins/project/vsxmake/vsproj/Xmake.props | 6 +++--- xmake/plugins/project/vsxmake/vsproj/Xmake.targets | 6 ++++-- .../project/vsxmake/vsproj/templates/vcxproj/XmakeConfig(mode,arch) | 3 +++ .../project/vsxmake/vsproj/templates/vcxproj/XmakePath(mode,arch) | 3 --- 5 files changed, 12 insertions(+), 10 deletions(-) diff --git a/xmake/plugins/project/vsxmake/getinfo.lua b/xmake/plugins/project/vsxmake/getinfo.lua index 0c033b145..a5a621a5b 100644 --- a/xmake/plugins/project/vsxmake/getinfo.lua +++ b/xmake/plugins/project/vsxmake/getinfo.lua @@ -104,7 +104,7 @@ function _get_values(target, name) for _, dep in irpairs(target:orderdeps()) do local depinherit = target:extraconf("deps", dep:name(), "inherit") if depinherit == nil or depinherit then - table.join2(values, dep:get(name, {interface = true})) + table.join2(values, dep:get(name, { interface = true })) end end @@ -159,7 +159,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(target:values("project.vsxmake.vcsourcepaths")) + targetinfo.sourcedirs = _make_dirs(_get_values(target, "project.vsxmake.sourcedirs")) -- 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 07c25eb22..3b4ae268e 100644 --- a/xmake/plugins/project/vsxmake/vsproj/Xmake.props +++ b/xmake/plugins/project/vsxmake/vsproj/Xmake.props @@ -120,11 +120,11 @@ - $(XmakeIncludeDir);$(IncludePath) - $(XmakeLinkDir);$(LibraryPath) + $(XmakeIncludeDirs);$(IncludePath) + $(XmakeLinkDirs);$(LibraryPath) $(XmakeTargetDir)\ $(XmakeBuilDir)\.vs\$(TargetName)\$(XmakeArch)\$(XmakeMode)\ - $(VC_SourcePath);$(XmakeVCSourcePaths); + $(XmakeSourceDirs);$(SourcePath) diff --git a/xmake/plugins/project/vsxmake/vsproj/Xmake.targets b/xmake/plugins/project/vsxmake/vsproj/Xmake.targets index 6c61a33d4..0a74e5f45 100644 --- a/xmake/plugins/project/vsxmake/vsproj/Xmake.targets +++ b/xmake/plugins/project/vsxmake/vsproj/Xmake.targets @@ -127,8 +127,9 @@ MSBuild Properties: XmakeMfcKind: $(XmakeMfcKind) XmakeDefines: $(XmakeDefines) XmakeLanguages: $(XmakeLanguages) - XmakeIncludeDir: $(XmakeIncludeDir) - XmakeLinkDir: $(XmakeLinkDir) + XmakeIncludeDirs: $(XmakeIncludeDirs) + XmakeLinkDirs: $(XmakeLinkDirs) + XmakeSourceDirs: $(XmakeSourceDirs) Xmake Path: XmakeProgramDir: $(XmakeProgramDir) XmakeProjectDir: $(XmakeProjectDir) @@ -171,6 +172,7 @@ MSBuild Properties: MSBuildProjectName: $(MSBuildProjectName) OutDir: $(OutDir) IntDir: $(IntDir) + SourcePath: $(SourcePath) TargetName: $(TargetName) TargetExt: $(TargetExt) PlatformToolset: $(PlatformToolset) diff --git a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakeConfig(mode,arch) b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakeConfig(mode,arch) index 317dc32e4..320a661fb 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakeConfig(mode,arch) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakeConfig(mode,arch) @@ -11,4 +11,7 @@ #mfckind# #runenvs# #configflags# + #includedirs# + #linkdirs# + #sourcedirs# 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 bc3c028b9..9afa8460f 100644 --- a/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakePath(mode,arch) +++ b/xmake/plugins/project/vsxmake/vsproj/templates/vcxproj/XmakePath(mode,arch) @@ -3,8 +3,5 @@ #configdir# #configfiledir# #targetdir# - #includedirs# - #linkdirs# #rundir# - #vcsourcepaths# -- cgit v1.3.1