我正在尝试将现有的 C# 转换为 premake。我正在使用 premake5 alpha 6。在我的 C# 项目中,如果它是 release|x86、Debug|x86..etc,则根据构建配置设置引用的“何时条件”包括在内。如何在 premake 中设置When Condition=?
在我现有的项目文件中:
<When Condition=" ('$(Configuration)|$(Platform)' == 'Release|AnyCPU' Or ('$(Configuration)|$(Platform)' == 'Release|x86') ">
<ItemGroup>
<Reference Include="Project_v100">
<HintPath>..\..\bin\x86\Project_v100.dll</HintPath>
</Reference>
</ItemGroup>
</When>
我知道如果我在预制中这样做,结果将如下所示。
在预制中:
links "Project_v100.dll"
在项目文件中:
<Reference Include="Project_v100">
<HintPath>..\..\bin\x86\Project_v100.dll</HintPath>
<Private>False</Private>
</Reference>