Skip to content

Conversation

@walbourn
Copy link
Member

@walbourn walbourn commented Nov 4, 2025

This updates the use of CMake build options to address a few issues:

  • For VCPKG port, I want to add more features to control use of XInput vs. GameInput vs. WGI

  • For cases where you are building for Windows 10 or later, the default logic will try to use WGI for input. This causes link issues when the library was built for Windows 10, but the client wasn't or vice-versa. This ensures the expected build define is in the CMake targets--MSBuild targets still have to deal with this manually.

  • GameInput supports MinGW64, and otherwise can only use XInput.

  • This also includes some cleanup of the CMake logic.

@walbourn walbourn self-assigned this Nov 4, 2025
@walbourn walbourn added the cmake Related to CMake build label Nov 4, 2025
Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR refactors the build configuration logic for MinGW and other platforms to properly manage the BUILD_XINPUT flag and simplify XAudio configuration. The changes consolidate platform-specific build settings and add new MinGW presets with GameInput support.

  • Moved platform-specific configuration logic earlier in CMakeLists.txt for better organization
  • Removed redundant BUILD_XINPUT flag from the XAudio2Redist preset in CMakePresets.json
  • Added new MinGW presets with GameInput support

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
CMakePresets.json Removed BUILD_XINPUT from XAudio2Redist preset and added new MinGW-GI presets for GameInput support
CMakeLists.txt Reorganized platform-specific configuration logic, added explicit XAudio settings for WINDOWS_STORE and Xbox, and simplified conditional checks

@walbourn walbourn merged commit dc30f6b into main Nov 5, 2025
123 checks passed
@walbourn walbourn deleted the cmakefeatures branch November 5, 2025 20:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cmake Related to CMake build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants