mirror of
https://github.com/aseprite/aseprite.git
synced 2024-12-25 06:19:32 +00:00
Remove FindDSound. Update FindDxxx.cmake files to use DXSDK_DIR variable (as in Allegro 5).
This commit is contained in:
parent
f9aa176c09
commit
094f0b6e8f
@ -158,10 +158,9 @@ endif()
|
||||
if(WIN32)
|
||||
find_package(DDraw)
|
||||
find_package(DInput)
|
||||
find_package(DSound)
|
||||
find_package(DXGuid)
|
||||
|
||||
if(NOT DDRAW_FOUND OR NOT DINPUT_FOUND OR NOT DSOUND_FOUND OR NOT DXGUID_FOUND)
|
||||
if(NOT DDRAW_FOUND OR NOT DINPUT_FOUND OR NOT DXGUID_FOUND)
|
||||
if(MSVC)
|
||||
message(FATAL_ERROR
|
||||
"DirectX required for Windows port. You might need to add DirectX include and lib directories to your INCLUDE and LIB environment variables.")
|
||||
@ -176,7 +175,6 @@ if(WIN32)
|
||||
include_directories(SYSTEM
|
||||
${DDRAW_INCLUDE_DIR}
|
||||
${DINPUT_INCLUDE_DIR}
|
||||
${DSOUND_INCLUDE_DIR}
|
||||
${DXGUID_INCLUDE_DIR}
|
||||
)
|
||||
|
||||
@ -190,7 +188,6 @@ if(WIN32)
|
||||
${DDRAW_LIBRARIES}
|
||||
${DXGUID_LIBRARIES}
|
||||
winmm
|
||||
${DSOUND_LIBRARIES}
|
||||
shlwapi
|
||||
psapi
|
||||
wininet
|
||||
|
@ -10,20 +10,13 @@ if(DDRAW_INCLUDE_DIR)
|
||||
set(DDRAW_FIND_QUIETLY TRUE)
|
||||
endif(DDRAW_INCLUDE_DIR)
|
||||
|
||||
# Makes my life easier.
|
||||
if(MSVC)
|
||||
set(HINT_INCLUDE "C:/Program Files/Microsoft DirectX SDK (August 2008)/Include")
|
||||
set(HINT_LIB "C:/Program Files/Microsoft DirectX SDK (August 2008)/Lib")
|
||||
endif(MSVC)
|
||||
|
||||
find_path(DDRAW_INCLUDE_DIR ddraw.h
|
||||
PATH ${HINT_INCLUDE}
|
||||
PATH $ENV{DXSDK_DIR}/Include
|
||||
)
|
||||
|
||||
find_library(DDRAW_LIBRARY
|
||||
NAMES ddraw
|
||||
PATHS ${HINT_LIB}
|
||||
PATH_SUFFIXES x86 x64
|
||||
PATHS "$ENV{DXSDK_DIR}/Lib/$ENV{PROCESSOR_ARCHITECTURE}"
|
||||
)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set DDRAW_FOUND to TRUE if
|
||||
|
@ -10,20 +10,13 @@ if(DINPUT_INCLUDE_DIR)
|
||||
set(DINPUT_FIND_QUIETLY TRUE)
|
||||
endif(DINPUT_INCLUDE_DIR)
|
||||
|
||||
# Makes my life easier.
|
||||
if(MSVC)
|
||||
set(HINT_INCLUDE "C:/Program Files/Microsoft DirectX SDK (August 2008)/Include")
|
||||
set(HINT_LIB "C:/Program Files/Microsoft DirectX SDK (August 2008)/Lib")
|
||||
endif(MSVC)
|
||||
|
||||
find_path(DINPUT_INCLUDE_DIR dinput.h
|
||||
PATH ${HINT_INCLUDE}
|
||||
PATH $ENV{DXSDK_DIR}/Include
|
||||
)
|
||||
|
||||
find_library(DINPUT_LIBRARY
|
||||
NAMES dinput dinput8
|
||||
PATHS ${HINT_LIB}
|
||||
PATH_SUFFIXES x86 x64
|
||||
NAMES dinput8
|
||||
PATHS "$ENV{DXSDK_DIR}/Lib/$ENV{PROCESSOR_ARCHITECTURE}"
|
||||
)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set DINPUT_FOUND to TRUE if
|
||||
|
@ -1,39 +0,0 @@
|
||||
# - Find DirectSound
|
||||
# Find the DirectSound includes and libraries
|
||||
#
|
||||
# DSOUND_INCLUDE_DIR - where to find dsound.h
|
||||
# DSOUND_LIBRARIES - List of libraries when using dsound.
|
||||
# DSOUND_FOUND - True if dsound found.
|
||||
|
||||
if(DSOUND_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set(DSOUND_FIND_QUIETLY TRUE)
|
||||
endif(DSOUND_INCLUDE_DIR)
|
||||
|
||||
# Makes my life easier.
|
||||
if(MSVC)
|
||||
set(HINT_INCLUDE "C:/Program Files/Microsoft DirectX SDK (August 2008)/Include")
|
||||
set(HINT_LIB "C:/Program Files/Microsoft DirectX SDK (August 2008)/Lib")
|
||||
endif(MSVC)
|
||||
|
||||
find_path(DSOUND_INCLUDE_DIR dsound.h
|
||||
PATHS ${HINT_INCLUDE})
|
||||
|
||||
find_library(DSOUND_LIBRARY NAMES dsound
|
||||
PATHS ${HINT_LIB}
|
||||
PATH_SUFFIXES x86 x64
|
||||
)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set DSOUND_FOUND to TRUE if
|
||||
# all listed variables are TRUE.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args(DSOUND DEFAULT_MSG
|
||||
DSOUND_INCLUDE_DIR DSOUND_LIBRARY)
|
||||
|
||||
if(DSOUND_FOUND)
|
||||
set(DSOUND_LIBRARIES ${DSOUND_LIBRARY})
|
||||
else(DSOUND_FOUND)
|
||||
set(DSOUND_LIBRARIES)
|
||||
endif(DSOUND_FOUND)
|
||||
|
||||
mark_as_advanced(DSOUND_INCLUDE_DIR DSOUND_LIBRARY)
|
@ -4,14 +4,10 @@
|
||||
# DXGUID_LIBRARIES - List of libraries
|
||||
# DXGUID_FOUND - True if dxguid found.
|
||||
|
||||
if(MSVC)
|
||||
find_library(DXGUID_LIBRARY NAMES dxguid
|
||||
PATHS "C:/Program Files/Microsoft DirectX SDK (August 2008)/Lib"
|
||||
PATH_SUFFIXES x86 x64
|
||||
)
|
||||
else()
|
||||
find_library(DXGUID_LIBRARY NAMES dxguid)
|
||||
endif()
|
||||
find_library(DXGUID_LIBRARY
|
||||
NAMES dxguid
|
||||
PATHS "$ENV{DXSDK_DIR}/Lib/$ENV{PROCESSOR_ARCHITECTURE}"
|
||||
)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set DXGUID_FOUND to TRUE if
|
||||
# all listed variables are TRUE.
|
||||
|
Loading…
Reference in New Issue
Block a user