summaryrefslogtreecommitdiff
path: root/xmake/plugins
diff options
context:
space:
mode:
authorruki <[email protected]>2019-02-03 15:27:07 +0800
committerruki <[email protected]>2019-02-03 15:27:07 +0800
commit640c2e7e81809d122adca38aca09d2448f14ed50 (patch)
treef0516a372a39d0e6b42461f8352d43210be67a72 /xmake/plugins
parentb3985752dd4ff11e6fbcf38058da40ff92635c81 (diff)
improve target kind
Diffstat (limited to 'xmake/plugins')
-rw-r--r--xmake/plugins/project/vstudio/impl/vs200x_vcproj.lua6
-rw-r--r--xmake/plugins/project/vstudio/impl/vs201x.lua6
2 files changed, 6 insertions, 6 deletions
diff --git a/xmake/plugins/project/vstudio/impl/vs200x_vcproj.lua b/xmake/plugins/project/vstudio/impl/vs200x_vcproj.lua
index e240b667a..272c37755 100644
--- a/xmake/plugins/project/vstudio/impl/vs200x_vcproj.lua
+++ b/xmake/plugins/project/vstudio/impl/vs200x_vcproj.lua
@@ -74,7 +74,7 @@ end
function _make_linkflags(target, vcprojdir)
-- make the linking flags
- local linkflags = linker.linkflags(target:get("kind"), target:sourcekinds(), {target = target})
+ local linkflags = linker.linkflags(target:targetkind(), target:sourcekinds(), {target = target})
-- replace -libpath:dir or /libpath:dir, -pdb:symbol.pdb or /pdb:symbol.pdb
local flags = {}
@@ -214,7 +214,7 @@ end
function _make_VCLinkerTool(vcprojfile, vsinfo, target, vcprojdir)
-- need not linker?
- local kind = target:get("kind")
+ local kind = target:targetkind()
if kind ~= "binary" and kind ~= "shared" then
vcprojfile:enter("<Tool")
vcprojfile:print("Name=\"VCLinkerTool\"")
@@ -304,7 +304,7 @@ function _make_configurations(vcprojfile, vsinfo, target, vcprojdir)
vcprojfile:print("Name=\"$(mode)|Win32\"")
vcprojfile:print("OutputDirectory=\"%s\"", path.relative(path.absolute(target:targetdir()), vcprojdir))
vcprojfile:print("IntermediateDirectory=\"%s\"", path.relative(path.absolute(target:objectdir()), vcprojdir))
- vcprojfile:print("ConfigurationType=\"%d\"", assert(configuration_types[target:get("kind")]))
+ vcprojfile:print("ConfigurationType=\"%d\"", assert(configuration_types[target:targetkind()]))
vcprojfile:print("CharacterSet=\"%d\"", unicode and 1 or 2) -- mbc: 2, wcs: 1
vcprojfile:print("UseOfMFC=\"%d\"", usemfc)
vcprojfile:print(">")
diff --git a/xmake/plugins/project/vstudio/impl/vs201x.lua b/xmake/plugins/project/vstudio/impl/vs201x.lua
index 30ea20837..0fd80605a 100644
--- a/xmake/plugins/project/vstudio/impl/vs201x.lua
+++ b/xmake/plugins/project/vstudio/impl/vs201x.lua
@@ -90,7 +90,7 @@ function _make_targetinfo(mode, arch, target)
end
-- save linker flags
- local linkflags = linker.linkflags(target:get("kind"), target:sourcekinds(), {target = target})
+ local linkflags = linker.linkflags(target:targetkind(), target:sourcekinds(), {target = target})
targetinfo.linkflags = linkflags
-- use mfc? save the mfc runtime kind
@@ -116,7 +116,7 @@ end
function _make_targetheaders(mode, arch, target, last)
-- only for static and shared target
- local kind = target:get("kind")
+ local kind = target:targetkind()
if kind == "static" or kind == "shared" then
-- TODO make headers, (deprecated)
@@ -258,7 +258,7 @@ function make(outputdir, vsinfo)
-- init target info
_target.name = targetname
- _target.kind = target:get("kind")
+ _target.kind = target:targetkind()
_target.scriptdir = target:scriptdir()
_target.info = _target.info or {}
table.insert(_target.info, _make_targetinfo(mode, arch, target))