问题
I'm working on simple hello world application:
// main.cpp
#include <iostream>
int main(int argc, char ** argv) {
std::cout << "Hello world!" << std::endl;
return 0;
}
// CMakeLists.txt
cmake_minimum_required(VERSION 3.0.0)
project(hello)
add_executable(${PROJECT_NAME} main.cpp)
I'm trying to build it using:
cmake -G "Ninja" "-DCMAKE_SYSTEM_NAME=WindowsStore" "-DCMAKE_SYSTEM_VERSION=10.0"
ninja
And it seems to build, but I'd like to additionally generate UWP package (.appx) to be able to deploy it on xbox.
How can I create UWP package with this example, that will be deployable to xbox?
回答1:
And it seems to build, but I'd like to additionally generate UWP package (.appx).
CMake is a cross-platform open-source tool for defining build processes that run across multiple platforms by abstracting away native build environments and compilers. CMake interprets a CMakeLists.txt script the user authors and generates a build plan in a build environment of choice.
It can't be use to generate UWP package. However, you could use make.exe
or Visual Studio
to generate UWP package. For more you could refer to Create an app package with the MakeAppx.exe tool and Package a UWP app with Visual Studio.
to be able to deploy it on xbox.
Currently, the only way to deploy a UWP to an Xbox console is to use Visual Studio to deploy loose application payload. And you could get the tutorial form Getting started with UWP app development on Xbox One.
来源:https://stackoverflow.com/questions/46484558/create-uwp-package-using-cmake