-
-
Notifications
You must be signed in to change notification settings - Fork 812
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
Conversation
…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")])) |
There was a problem hiding this comment.
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)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
此处逗号也是。加个空格
👍 |
Codecov Report
@@ 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.
|
已merge, 多谢贡献 😄 |
1.vs的输出目录调整为和xmake脚本中的一致,使用target:targetdir
2.vs的临时obj目录调整为和xmake脚本中的一致,使用target:objectdir
3.vs输出文件(包括pdb、lib等)去除显式指定,调整为使用$(TargetDir)$(TargetName)命名(该设置不指定会自动设置,所以不用显式指定)。该修改同时修复了动态库输出lib与xmake中指定目录不一致的bug
4.生成vs项目中的链接库目录、包含文件目录进行路径标准化转换