mirror of https://github.com/PCSX2/pcsx2.git
3rdparty: add libsamplerate cmake defs
This commit is contained in:
parent
8f8a83a038
commit
2788198b75
|
@ -0,0 +1,25 @@
|
||||||
|
# - Try to find libsamplerate
|
||||||
|
# Once done this will define
|
||||||
|
#
|
||||||
|
# LIBSAMPLERATE_FOUND - system has libsamplerate
|
||||||
|
# LIBSAMPLERATE_INCLUDE_DIRS - the libsamplerate include directory
|
||||||
|
# LIBSAMPLERATE_LIBRARIES - The libsamplerate libraries
|
||||||
|
|
||||||
|
find_package(PkgConfig)
|
||||||
|
if(PKG_CONFIG_FOUND)
|
||||||
|
pkg_check_modules (LIBSAMPLERATE samplerate)
|
||||||
|
list(APPEND LIBSAMPLERATE_INCLUDE_DIRS ${LIBSAMPLERATE_INCLUDEDIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
|
if(NOT LIBSAMPLERATE_FOUND)
|
||||||
|
find_path( LIBSAMPLERATE_INCLUDE_DIRS "samplerate.h"
|
||||||
|
PATH_SUFFIXES "samplerate" )
|
||||||
|
find_library( LIBSAMPLERATE_LIBRARIES samplerate)
|
||||||
|
endif()
|
||||||
|
|
||||||
|
# handle the QUIETLY and REQUIRED arguments and set SAMPLERATE_FOUND to TRUE if
|
||||||
|
# all listed variables are TRUE
|
||||||
|
include( "FindPackageHandleStandardArgs" )
|
||||||
|
find_package_handle_standard_args(libsamplerate DEFAULT_MSG LIBSAMPLERATE_INCLUDE_DIRS LIBSAMPLERATE_LIBRARIES)
|
||||||
|
|
||||||
|
mark_as_advanced(LIBSAMPLERATE_INCLUDE_DIRS LIBSAMPLERATE_LIBRARIES)
|
|
@ -93,6 +93,9 @@ find_package(ZLIB)
|
||||||
## Use pcsx2 package to find module
|
## Use pcsx2 package to find module
|
||||||
include(FindLibc)
|
include(FindLibc)
|
||||||
|
|
||||||
|
## Use pcsx2 package to find module
|
||||||
|
include(Findlibsamplerate)
|
||||||
|
|
||||||
## Use CheckLib package to find module
|
## Use CheckLib package to find module
|
||||||
include(CheckLib)
|
include(CheckLib)
|
||||||
if(Linux)
|
if(Linux)
|
||||||
|
@ -189,6 +192,10 @@ if(PCAP_FOUND)
|
||||||
include_directories(${PCAP_INCLUDE_DIR})
|
include_directories(${PCAP_INCLUDE_DIR})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(LIBSAMPLERATE_FOUND)
|
||||||
|
include_directories(${LIBSAMPLERATE_INCLUDE_DIR})
|
||||||
|
endif()
|
||||||
|
|
||||||
if(LIBXML2_FOUND)
|
if(LIBXML2_FOUND)
|
||||||
include_directories(${LIBXML2_INCLUDE_DIRS})
|
include_directories(${LIBXML2_INCLUDE_DIRS})
|
||||||
endif()
|
endif()
|
||||||
|
|
|
@ -361,8 +361,6 @@ set(pcsx2USBSources
|
||||||
# USB headers
|
# USB headers
|
||||||
set(pcsx2USBHeaders
|
set(pcsx2USBHeaders
|
||||||
USB/USB.h
|
USB/USB.h
|
||||||
USB/PS2Etypes.h
|
|
||||||
USB/PS2Edefs.h
|
|
||||||
USB/proxybase.h
|
USB/proxybase.h
|
||||||
USB/deviceproxy.h
|
USB/deviceproxy.h
|
||||||
USB/configuration.h
|
USB/configuration.h
|
||||||
|
@ -905,6 +903,7 @@ set(pcsx2FinalLibs
|
||||||
Utilities
|
Utilities
|
||||||
x86emitter
|
x86emitter
|
||||||
fmt::fmt
|
fmt::fmt
|
||||||
|
libsamplerate
|
||||||
${wxWidgets_LIBRARIES}
|
${wxWidgets_LIBRARIES}
|
||||||
${GTK2_LIBRARIES}
|
${GTK2_LIBRARIES}
|
||||||
${ZLIB_LIBRARIES}
|
${ZLIB_LIBRARIES}
|
||||||
|
@ -914,6 +913,7 @@ set(pcsx2FinalLibs
|
||||||
${SOUNDTOUCH_LIBRARIES}
|
${SOUNDTOUCH_LIBRARIES}
|
||||||
${SDL2_LIBRARIES}
|
${SDL2_LIBRARIES}
|
||||||
${PCAP_LIBRARY}
|
${PCAP_LIBRARY}
|
||||||
|
${LIBSAMPLERATE_LIBRARIES}
|
||||||
${LIBXML2_LIBRARIES}
|
${LIBXML2_LIBRARIES}
|
||||||
${Platform_Libs}
|
${Platform_Libs}
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in New Issue