Get Include Directories for custom build step

被刻印的时光 ゝ 提交于 2019-12-04 17:40:05

I think I found an answer, however incomplete.

One can specify in the property sheets something like this:

<PropertyGroup>
    <ProjectIncludeDir>@(ClCompile->'%(AdditionalIncludeDirectories)')</ProjectIncludeDir>
</PropertyGroup>

This will make the macro $(ProjectIncludeDir) available to the custom build steps too containing the list of include directories.

The problem with this approach that string operations are not possible on this macro anymore. For example consider following:

<ProjectIncludeDirDot>$(ProjectIncludeDir.Replace(';',','))</ProjectIncludeDirDot>

This results for the macro $(ProjectIncludeDirDot) in @(ClCompile->'%(AdditionalIncludeDirectories)'). It seems that transforms are get evaluated after the macro evaluation, which breaks that replacement. If somebody knows for a better solution, please...

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!