Search for the correct include and lib directories for the DX SDK
And only set them when needed.
This commit is contained in:
parent
d60ce35846
commit
dd1df64537
@ -230,9 +230,6 @@ IF(MSVC)
|
||||
ENDIF()
|
||||
IF(DXSDK_DIR)
|
||||
MESSAGE(STATUS "Using DirectX SDK directory: ${DXSDK_DIR}")
|
||||
SET(CMAKE_REQUIRED_INCLUDES ${CMAKE_REQUIRED_INCLUDES} "${DXSDK_DIR}/Include")
|
||||
INCLUDE_DIRECTORIES("${DXSDK_DIR}/Include")
|
||||
LINK_DIRECTORIES("${DXSDK_DIR}/Lib")
|
||||
ENDIF()
|
||||
|
||||
OPTION(FORCE_STATIC_VCRT "Force /MT for static VC runtimes" OFF)
|
||||
|
@ -9,14 +9,16 @@
|
||||
#
|
||||
|
||||
find_path(DSOUND_INCLUDE_DIR
|
||||
PATHS "${DXSDK_DIR}/include"
|
||||
NAMES dsound.h
|
||||
PATHS "${DXSDK_DIR}"
|
||||
PATH_SUFFIXES include
|
||||
DOC "The DirectSound include directory"
|
||||
)
|
||||
|
||||
find_library(DSOUND_LIBRARY
|
||||
PATHS "${DXSDK_DIR}/lib"
|
||||
NAMES dsound
|
||||
PATHS "${DXSDK_DIR}"
|
||||
PATH_SUFFIXES lib lib/x86 lib/x64
|
||||
DOC "The DirectSound library"
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user