Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix targetdir,objectdir not used in vsproject #205

Merged
merged 3 commits into from Aug 31, 2018
Merged

Conversation

xigalto
Copy link
Contributor

@xigalto xigalto commented Aug 30, 2018

1.vs的输出目录调整为和xmake脚本中的一致,使用target:targetdir
2.vs的临时obj目录调整为和xmake脚本中的一致,使用target:objectdir
3.vs输出文件(包括pdb、lib等)去除显式指定,调整为使用$(TargetDir)$(TargetName)命名(该设置不指定会自动设置,所以不用显式指定)。该修改同时修复了动态库输出lib与xmake中指定目录不一致的bug
4.生成vs项目中的链接库目录、包含文件目录进行路径标准化转换

…ng target:targetdir

The temporary obj directory of VS is adjusted to match the xmake script, using target:objectdir

The vs output file (including pdb, lib, etc.) removes explicit specifications and adjusts to use the $(TargetDir) $(TargetName) name (this setting is not specified to be set automatically, so it is not explicitly specified). This modification also restores the bug of the dynamic library output lib which is inconsistent with the specified directory in xmake.

Generate the directory Library of the vs project, including file directory to standardize the path.

1.vs的输出目录调整为和xmake脚本中的一致,使用target:targetdir
2.vs的临时obj目录调整为和xmake脚本中的一致,使用target:objectdir
3.vs输出文件(包括pdb、lib等)去除显式指定,调整为使用$(TargetDir)$(TargetName)命名(该设置不指定会自动设置,所以不用显式指定)。该修改同时修复了动态库输出lib与xmake中指定目录不一致的bug
4.生成vs项目中的链接库目录、包含文件目录进行路径标准化转换
vcprojfile:print("OutputDirectory=\"%s\"", path.relative(path.absolute(config.get("buildir")), vcprojdir))
vcprojfile:print("IntermediateDirectory=\"%$(ConfigurationName)\"")
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")]))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

,path.relative 逗号后请加个空格。

vcxprojfile:print("<OutDir>%s\\</OutDir>", path.relative(path.absolute(config.get("buildir")), vcxprojdir))
vcxprojfile:print("<IntDir>%$(Configuration)\\</IntDir>")
vcxprojfile:print("<OutDir>%s\\</OutDir>", path.relative(path.absolute(targetinfo.targetdir), vcxprojdir))
vcxprojfile:print("<IntDir>%s\\</IntDir>",path.relative(path.absolute(targetinfo.objectdir),vcxprojdir))
vcxprojfile:print("<TargetName>%s</TargetName>", path.basename(targetinfo.targetfile))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

此处逗号也是。加个空格

@waruqi
Copy link
Member

waruqi commented Aug 30, 2018

👍

@codecov
Copy link

codecov bot commented Aug 31, 2018

Codecov Report

Merging #205 into dev will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##              dev     #205   +/-   ##
=======================================
  Coverage   55.19%   55.19%           
=======================================
  Files         342      342           
  Lines       15920    15920           
=======================================
  Hits         8787     8787           
  Misses       7133     7133

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update f88fbd7...d74715b. Read the comment docs.

@waruqi waruqi merged commit ac21734 into xmake-io:dev Aug 31, 2018
@waruqi
Copy link
Member

waruqi commented Aug 31, 2018

已merge, 多谢贡献 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants