Use Windows SDK if DirectX SDK not installed

main/atys-live
Nimetu 3 years ago committed by Nuno
parent 19c5b582bc
commit 8aa1aed3bd

@ -501,6 +501,17 @@ IF(WINSDK_INCLUDE_DIR)
IF(WINSDK_VERSION STREQUAL "7.1" AND (MSVC11 OR MSVC12 OR MSVC14)) IF(WINSDK_VERSION STREQUAL "7.1" AND (MSVC11 OR MSVC12 OR MSVC14))
ADD_DEFINITIONS(-D_USING_V110_SDK71_) ADD_DEFINITIONS(-D_USING_V110_SDK71_)
ENDIF() ENDIF()
IF(NOT DXSDK_DIR)
MESSAGE("Using DirectX from Windows SDK (${WINSDK_LIBRARY_DIRS})")
SET(DXSDK_DIR ${WINSDK_DIR})
FIND_LIBRARY(DXSDK_GUID_LIBRARY dxguid ${WINSDK_LIBRARY_DIRS})
FIND_LIBRARY(DXSDK_DINPUT_LIBRARY dinput8 ${WINSDK_LIBRARY_DIRS})
FIND_LIBRARY(DXSDK_DSOUND_LIBRARY dsound ${WINSDK_LIBRARY_DIRS})
FIND_LIBRARY(DXSDK_XAUDIO_LIBRARY xaudio2 ${WINSDK_LIBRARY_DIRS})
# TODO: FIND_LIBRARY(DXSDK_D3DX9_LIBRARY d3dx9)
FIND_LIBRARY(DXSDK_D3D9_LIBRARY d3d9 ${WINSDK_LIBRARY_DIRS})
ENDIF()
ELSE() ELSE()
IF(NOT WindowsSDK_FIND_QUIETLY) IF(NOT WindowsSDK_FIND_QUIETLY)
MESSAGE(STATUS "Warning: Unable to find Windows SDK!") MESSAGE(STATUS "Warning: Unable to find Windows SDK!")

@ -1279,7 +1279,7 @@ MACRO(SETUP_EXTERNAL)
IF(WIN32) IF(WIN32)
# Must include DXSDK before WINSDK # Must include DXSDK before WINSDK
FIND_PACKAGE(DirectXSDK REQUIRED) FIND_PACKAGE(DirectXSDK)
# IF(DXSDK_INCLUDE_DIR) # IF(DXSDK_INCLUDE_DIR)
# INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR}) # INCLUDE_DIRECTORIES(${DXSDK_INCLUDE_DIR})
# ENDIF() # ENDIF()
@ -1288,5 +1288,8 @@ MACRO(SETUP_EXTERNAL)
IF(MSVC) IF(MSVC)
FIND_PACKAGE(MSVC REQUIRED) FIND_PACKAGE(MSVC REQUIRED)
FIND_PACKAGE(WindowsSDK REQUIRED) FIND_PACKAGE(WindowsSDK REQUIRED)
IF(NOT DXSDK_DIR)
MESSAGE(FATAL_ERROR "DirectX SDK or DirectX files from Windows SDK not found.")
ENDIF()
ENDIF() ENDIF()
ENDMACRO() ENDMACRO()

Loading…
Cancel
Save