本文介绍了为 WindowsStore/UWP 构建的 MSBuild 标志的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

两天的研究没有给我任何结果.我想配置一个 conanfile 来为 UWP/WindowsStore 构建一个现有的 .sln,以确保一切都被允许.

Two days of research gave me no results. I want to configure a conanfile to build an existing .sln for UWP / WindowsStore, to make sure everything is allowed.

这是 conanfile.py

class LibConan(ConanFile):
  def build(self)
    msbuild = MSBuild(self)
    msbuild.build(
      'library.sln',
      targets=['liblibrary'],
      platforms={'x86': 'Win32', 'x86_64': 'x64'},
      toolset=self.settings.compiler.toolset,
      use_env=False)

我应该把什么参数/选项放在什么地方?

Where and what arguments/options should I put?

  • 现有项目不提供CMakeLists.txt
  • .sln(库)是第三方库,因此不适用于更改.sln.vcxproj 文件
  • The existing project doesn't provide CMakeLists.txt
  • The .sln (library) is a third-party library, hence not applicable to change the .sln or .vcxproj files

推荐答案

WindowsStore 在 Conan 中被认为是一个 settings.os.因此,您需要为此类配置文件配置您的设置:

The WindowsStore is considered a settings.os in Conan. Thus, you need to configure your settings for such profile:

conan create . -s os=WindowsStore

或者,您可以创建一个新的Conan profile操作系统.

Or, you can create a new Conan profile with such os.

这篇关于为 WindowsStore/UWP 构建的 MSBuild 标志的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

09-11 04:28