mirror of
https://github.com/cemu-project/vcpkg.git
synced 2025-02-22 18:47:09 +01:00
Make sure dsound uses version and header of current environment
This commit is contained in:
parent
e573ed00a1
commit
93ebc6c746
@ -1,3 +1,3 @@
|
||||
Source: portaudio
|
||||
Version: 19.0.6.00
|
||||
Version: 19.0.6.00-1
|
||||
Description: PortAudio Portable Cross-platform Audio I/O API PortAudio is a free, cross-platform, open-source, audio I/O library. It lets you write simple audio programs in 'C' or C++ that will compile and run on many platforms including Windows, Macintosh OS X, and Unix (OSS/ALSA). It is intended to promote the exchange of audio software between developers on different platforms. Many applications use PortAudio for Audio I/O.
|
||||
|
114
ports/portaudio/find_dsound.patch
Normal file
114
ports/portaudio/find_dsound.patch
Normal file
@ -0,0 +1,114 @@
|
||||
--- a/cmake_support/FindDXSDK.cmake
|
||||
+++ b/cmake_support/FindDXSDK.cmake
|
||||
@@ -16,44 +16,70 @@ else(WIN32)
|
||||
message(FATAL_ERROR "FindDXSDK.cmake: Unsupported platform ${CMAKE_SYSTEM_NAME}" )
|
||||
endif(WIN32)
|
||||
|
||||
-find_path(DXSDK_ROOT_DIR
|
||||
- include/dxsdkver.h
|
||||
- HINTS
|
||||
- $ENV{DXSDK_DIR}
|
||||
-)
|
||||
-
|
||||
-find_path(DXSDK_INCLUDE_DIR
|
||||
- dxsdkver.h
|
||||
- PATHS
|
||||
- ${DXSDK_ROOT_DIR}/include
|
||||
-)
|
||||
-
|
||||
-IF(CMAKE_CL_64)
|
||||
-find_path(DXSDK_LIBRARY_DIR
|
||||
- dsound.lib
|
||||
- PATHS
|
||||
- ${DXSDK_ROOT_DIR}/lib/x64
|
||||
-)
|
||||
-ELSE(CMAKE_CL_64)
|
||||
-find_path(DXSDK_LIBRARY_DIR
|
||||
- dsound.lib
|
||||
- PATHS
|
||||
- ${DXSDK_ROOT_DIR}/lib/x86
|
||||
-)
|
||||
-ENDIF(CMAKE_CL_64)
|
||||
-
|
||||
-find_library(DXSDK_DSOUND_LIBRARY
|
||||
- dsound.lib
|
||||
- PATHS
|
||||
- ${DXSDK_LIBRARY_DIR}
|
||||
-)
|
||||
-
|
||||
-# handle the QUIETLY and REQUIRED arguments and set DXSDK_FOUND to TRUE if
|
||||
-# all listed variables are TRUE
|
||||
-INCLUDE(FindPackageHandleStandardArgs)
|
||||
-FIND_PACKAGE_HANDLE_STANDARD_ARGS(DXSDK DEFAULT_MSG DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR)
|
||||
-
|
||||
-MARK_AS_ADVANCED(
|
||||
- DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR
|
||||
- DXSDK_LIBRARY_DIR DXSDK_DSOUND_LIBRARY
|
||||
-)
|
||||
+# Dsound.lib is statically linked (i.e. dsound.dll not required) and DXSDK_LIBRARY_DIR not used.
|
||||
+# In the environments supported by VCPKG we may as well avoid looking out for DX9 to avoid version
|
||||
+# mismatch in find.
|
||||
+
|
||||
+if(MSVC AND MSVC_VERSION GREATER_EQUAL 1900)
|
||||
+
|
||||
+ # if the environment is set up properly, matching lib and header will be found
|
||||
+
|
||||
+ find_path(DXSDK_INCLUDE_DIR
|
||||
+ dsound.h
|
||||
+ )
|
||||
+ find_library(DXSDK_DSOUND_LIBRARY
|
||||
+ dsound.lib
|
||||
+ )
|
||||
+
|
||||
+ INCLUDE(FindPackageHandleStandardArgs)
|
||||
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(DXSDK DEFAULT_MSG DXSDK_INCLUDE_DIR DXSDK_DSOUND_LIBRARY)
|
||||
+
|
||||
+ MARK_AS_ADVANCED(
|
||||
+ DXSDK_INCLUDE_DIR DXSDK_DSOUND_LIBRARY
|
||||
+ )
|
||||
+
|
||||
+else()
|
||||
+
|
||||
+ find_path(DXSDK_ROOT_DIR
|
||||
+ include/dxsdkver.h
|
||||
+ HINTS
|
||||
+ $ENV{DXSDK_DIR}
|
||||
+ )
|
||||
+
|
||||
+ find_path(DXSDK_INCLUDE_DIR
|
||||
+ dxsdkver.h
|
||||
+ HINTS
|
||||
+ ${DXSDK_ROOT_DIR}/include
|
||||
+ )
|
||||
+
|
||||
+ IF(CMAKE_CL_64)
|
||||
+ find_path(DXSDK_LIBRARY_DIR
|
||||
+ dsound.lib
|
||||
+ HINTS
|
||||
+ ${DXSDK_ROOT_DIR}/lib/x64
|
||||
+ )
|
||||
+ ELSE(CMAKE_CL_64)
|
||||
+ find_path(DXSDK_LIBRARY_DIR
|
||||
+ dsound.lib
|
||||
+ HINTS
|
||||
+ ${DXSDK_ROOT_DIR}/lib/x86
|
||||
+ )
|
||||
+ ENDIF(CMAKE_CL_64)
|
||||
+
|
||||
+ find_library(DXSDK_DSOUND_LIBRARY
|
||||
+ dsound.lib
|
||||
+ HINTS
|
||||
+ ${DXSDK_LIBRARY_DIR}
|
||||
+ )
|
||||
+
|
||||
+ # handle the QUIETLY and REQUIRED arguments and set DXSDK_FOUND to TRUE if
|
||||
+ # all listed variables are TRUE
|
||||
+ INCLUDE(FindPackageHandleStandardArgs)
|
||||
+ FIND_PACKAGE_HANDLE_STANDARD_ARGS(DXSDK DEFAULT_MSG DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR)
|
||||
+
|
||||
+ MARK_AS_ADVANCED(
|
||||
+ DXSDK_ROOT_DIR DXSDK_INCLUDE_DIR
|
||||
+ DXSDK_LIBRARY_DIR DXSDK_DSOUND_LIBRARY
|
||||
+ )
|
||||
+
|
||||
+endif()
|
@ -18,7 +18,8 @@ vcpkg_extract_source_archive(${ARCHIVE})
|
||||
vcpkg_apply_patches(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
PATCHES
|
||||
${CMAKE_CURRENT_LIST_DIR}/cmakelists-install.patch)
|
||||
${CMAKE_CURRENT_LIST_DIR}/cmakelists-install.patch
|
||||
${CMAKE_CURRENT_LIST_DIR}/find_dsound.patch)
|
||||
|
||||
vcpkg_configure_cmake(
|
||||
SOURCE_PATH ${SOURCE_PATH}
|
||||
|
Loading…
x
Reference in New Issue
Block a user