Visual studio 让Premake生成引用现有.props文件的vcxproj文件

Visual studio 让Premake生成引用现有.props文件的vcxproj文件,visual-studio,premake,vcxproj,Visual Studio,Premake,Vcxproj,我使用的第三方SDK提供了visual studio项目中使用的.props文件 我使用生成.vcxproj文件,而不是使用SDK的项目向导 如何让Premake生成vcxproj文件,使其添加对第三方.props文件的引用 目前,Premake将以下内容添加到我的vcxproj文件中: <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">

我使用的第三方SDK提供了visual studio项目中使用的.props文件

我使用生成.vcxproj文件,而不是使用SDK的项目向导

如何让Premake生成vcxproj文件,使其添加对第三方.props文件的引用

目前,Premake将以下内容添加到我的vcxproj文件中:

  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
  </ImportGroup>

然而,我希望它是这样的:

  <ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
    <Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
    <Import Project="ACME_SDK.props" Condition="exists('ACME_SDK.props')" />
  </ImportGroup>


所以有一个额外的导入标签。

afaik没有内置的方式

您可以研究重写propertySheets函数

p.override(premake.vstudio.vc2010, 'propertySheets',  customPropertySheets)
其中customPropertySheets是您需要调用基函数并添加所需其他内容的函数