@@ -60,14 +60,28 @@ if(XBOX_CONSOLE_TARGET STREQUAL "durango")
6060 set (BUILD_GAMEINPUTOFF )
6161 set (BUILD_WGIOFF )
6262 set (BUILD_XINPUTOFF )
63- set (BUILD_XBOXONE_SHADERSON )
6463 set (BUILD_XAUDIO_WIN10OFF )
6564 set (BUILD_XAUDIO_WIN8ON )
65+ set (BUILD_XAUDIO_REDISTOFF )
66+ set (BUILD_XBOXONE_SHADERSON )
6667 set (BUILD_TOOLSOFF )
6768elseif (WINDOWS_STORE)
6869 set (BUILD_GAMEINPUTOFF )
6970 set (BUILD_WGION )
71+ set (BUILD_XINPUTOFF )
72+ set (BUILD_XAUDIO_WIN10ON )
73+ set (BUILD_XAUDIO_WIN8OFF )
74+ set (BUILD_XAUDIO_REDISTOFF )
7075 set (BUILD_TOOLSOFF )
76+ elseif (MINGW)
77+ set (BUILD_WGIOFF )
78+ set (BUILD_XAUDIO_WIN10OFF )
79+ set (BUILD_XAUDIO_WIN8OFF )
80+ if (NOT BUILD_GAMEINPUT)
81+ set (BUILD_XINPUTON )
82+ endif ()
83+ elseif (WIN32 AND (NOT BUILD_GAMEINPUT)AND (NOT BUILD_WGI))
84+ set (BUILD_XINPUTON )
7185endif ()
7286
7387include (GNUInstallDirs)
@@ -145,29 +159,14 @@ set(SHADER_SOURCES
145159 Src/Shaders/SpriteEffect.fx
146160 Src/Shaders/ToneMap.fx)
147161
148- # Xbox-specific extensions
149- if (DEFINED XBOX_CONSOLE_TARGET)
150- set (LIBRARY_HEADERS${LIBRARY_HEADERS}
151- Inc/XboxDDSTextureLoader.h)
152-
153- set (LIBRARY_SOURCES${LIBRARY_SOURCES}
154- Src/XboxDDSTextureLoader.cpp)
155- endif ()
156-
157162# These source files are identical in both DX11 and DX12 version.
158163set (LIBRARY_HEADERS${LIBRARY_HEADERS}
159- Inc/GamePad.h
160- Inc/Keyboard.h
161- Inc/Mouse.h
162164 Inc/SimpleMath.h
163165 Inc/SimpleMath.inl)
164166
165167set (LIBRARY_SOURCES${LIBRARY_SOURCES}
166168 Src/BinaryReader.cpp
167- Src/GamePad.cpp
168169 Src/Geometry.cpp
169- Src/Keyboard.cpp
170- Src/Mouse.cpp
171170 Src/SimpleMath.cpp)
172171
173172set (LIBRARY_SOURCES${LIBRARY_SOURCES}
@@ -193,14 +192,28 @@ set(SHADER_SOURCES ${SHADER_SOURCES}
193192 Src/Shaders/Structures.fxh
194193 Src/Shaders/Utilities.fxh)
195194
196- if (MINGW)
197- set (BUILD_XAUDIO_WIN10OFF )
198- set (BUILD_XAUDIO_WIN8OFF )
195+ # Xbox-specific extensions
196+ if (DEFINED XBOX_CONSOLE_TARGET)
197+ set (LIBRARY_HEADERS${LIBRARY_HEADERS}
198+ Inc/XboxDDSTextureLoader.h)
199+
200+ set (LIBRARY_SOURCES${LIBRARY_SOURCES}
201+ Src/XboxDDSTextureLoader.cpp)
202+ endif ()
203+
204+ if (BUILD_XINPUTOR BUILD_WGIOR BUILD_GAMEINPUT)
205+ set (LIBRARY_HEADERS${LIBRARY_HEADERS}
206+ Inc/GamePad.h
207+ Inc/Keyboard.h
208+ Inc/Mouse.h)
209+
210+ set (LIBRARY_SOURCES${LIBRARY_SOURCES}
211+ Src/GamePad.cpp
212+ Src/Keyboard.cpp
213+ Src/Mouse.cpp)
199214endif ()
200215
201- if (WINDOWS_STORE
202- OR BUILD_XAUDIO_WIN10OR BUILD_XAUDIO_WIN8
203- OR BUILD_XAUDIO_REDIST)
216+ if (BUILD_XAUDIO_WIN10OR BUILD_XAUDIO_WIN8OR BUILD_XAUDIO_REDIST)
204217 set (LIBRARY_HEADERS${LIBRARY_HEADERS}
205218 Inc/Audio.h)
206219
@@ -274,7 +287,7 @@ if(WIN32 AND BUILD_SHARED_LIBS)
274287 target_link_libraries (${PROJECT_NAME} PRIVATE kernelx.lib combase.lib d3d12_x.lib xi.lib)
275288 endif ()
276289
277- if (MINGW)
290+ if (MINGWAND BUILD_XINPUT )
278291 target_link_libraries (${PROJECT_NAME} PRIVATE xinput1_4.lib)
279292 endif ()
280293else ()
@@ -297,9 +310,7 @@ target_include_directories(${PROJECT_NAME} PUBLIC
297310
298311target_compile_features (${PROJECT_NAME} PUBLIC cxx_std_11)
299312
300- if (WINDOWS_STORE
301- OR BUILD_XAUDIO_WIN10OR BUILD_XAUDIO_WIN8
302- OR BUILD_XAUDIO_REDIST)
313+ if (BUILD_XAUDIO_WIN10OR BUILD_XAUDIO_WIN8OR BUILD_XAUDIO_REDIST)
303314 target_include_directories (${PROJECT_NAME} PRIVATE Audio)
304315endif ()
305316
@@ -315,8 +326,7 @@ if(directxmath_FOUND)
315326 target_link_libraries (${PROJECT_NAME} PRIVATE Microsoft::DirectXMath)
316327endif ()
317328
318- if (BUILD_XAUDIO_REDIST
319- AND (NOT BUILD_XAUDIO_WIN10)AND (NOT BUILD_XAUDIO_WIN8)AND (NOT WINDOWS_STORE))
329+ if (BUILD_XAUDIO_REDISTAND (NOT BUILD_XAUDIO_WIN10)AND (NOT BUILD_XAUDIO_WIN8))
320330 message (STATUS "Using XAudio2Redist for DirectX Tool Kit for Audio." )
321331 find_package (xaudio2redist CONFIG REQUIRED)
322332 target_link_libraries (${PROJECT_NAME} PUBLIC Microsoft::XAudio2Redist)