We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3098

Summary: CMake project never enables xinput support on Windows
Product: SDL Reporter: Alex Szpakowski <amaranth72>
Component: buildAssignee: Sam Lantinga <slouken>
Status: RESOLVED FIXED QA Contact: Sam Lantinga <slouken>
Severity: normal    
Priority: P2    
Version: HG 2.0   
Hardware: All   
OS: Windows (All)   

Description Alex Szpakowski 2015-08-21 02:58:43 UTC
When using the CMake project to build SDL on Windows, it is never able to find xinput.h and so prevents the xinput gamepad support from being compiled.

The cmake configuration gives this output:

-- Looking for xinput.h
-- Looking for xinput.h - not found

The rest of the windows/directx-related headers are found successfully.

xinput.h definitely exists in the expected locations on my system - the Visual Studio project seems to find it fine and builds SDL's xinput code successfully. (My Xbox 360 gamepad is registered as an xinput gamecontroller when using the VS project, but isn't when using CMake.)

Tested using VS2013, running Windows 8.1.
Comment 1 Alex Szpakowski 2015-08-28 22:06:08 UTC
This commit should fix it: https://hg.libsdl.org/SDL/rev/3d08cb641cd5