-
Notifications
You must be signed in to change notification settings - Fork 993
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[feature] More customization options for Platform and PlatformToolset in MSBuildToolchain #16276
Comments
Hi @sykhro Thanks for your suggestion. I am trying to understand these customizations, but I don't know about these platforms, so I am a bit lost at the moment. Also, what kind of things goes into Do you have any suggestion or recommendation of Conan settings to model these platforms? Are these subsettings of the |
If GDK is installed system-wide as a VS add-on, the main thing that needs changing is the
You can use the public GDK from the VS installer. This will give you
Essentially telling CMake "hey, use the VS generator with the props for this platform when you compile". The core compiler flags and system includes are set by the VS props and we don't control those. You can look at one of the official examples here.
Yes, it would be shared
Yes, this is Windows. The compiler defines _WIN32 and uses the Windows SDK. The peculiarity is that it defines WINAPI_PARTITION_GAMES, and that disables some stuff in Windows.h. Xbox has some extra things that don't exist on Windows Desktop. The community has chosen to check for XBOX_CONSOLE_TARGET when CMAKE_SYSTEM_NAME = Windows to be able to differentiate the two. This is currently used by some OSS DirectX projects. With MSBuild you wouldn't care much about this obviously, since you distinguish things by Please note that this approach of defining a custom platform in VS is common among game console vendors. On those, at the moment, we scrape by with Ninja and custom CMake toolchain files: better build performance, the setup is simpler but also more flexible in defining post-build steps that are necessary to package executables to.. make them executable. They are also proprietary operating systems. |
What is your suggestion?
I use conan to manage packages built against the GDK, the Microsoft framework for developing games.
This platform
WINAPI_PARTITION_GAMES
(asWINAPI_PARTITION_APP
is to UWP)Gaming.Desktop.x64
, Xbox if you are licensedMost of this knowledge is public and vcpkg implements support for it: info.
The GDK is therefore a set of additional platforms/toolset for VS.
CMake is supported via
VS_*_PROPS
and there are examples of usage with Ninja.However, due to the nature (industry) of the platform and the fact it's still Windows, it's very useful to have MSBuildToolchain support since many projects (and ports) are native to VS. SDL, to name one*
For now, I have settled on the following, using a custom arch to override the VS platform
*not the greatest choice of example since I'll contribute adding it to CMake soon, but oh well
Have you read the CONTRIBUTING guide?
The text was updated successfully, but these errors were encountered: