mirror of
https://github.com/ZDoom/zdoom-macos-deps.git
synced 2024-11-23 12:22:40 +00:00
deps: update sndfile to 1.2.2
This commit is contained in:
parent
5b1bc06fce
commit
c097734065
12 changed files with 627 additions and 44 deletions
67
deps/sndfile/lib/cmake/SndFile/FindFLAC.cmake
vendored
Normal file
67
deps/sndfile/lib/cmake/SndFile/FindFLAC.cmake
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
# - Find FLAC
|
||||
# Find the native FLAC includes and libraries
|
||||
#
|
||||
# FLAC_INCLUDE_DIRS - where to find FLAC headers.
|
||||
# FLAC_LIBRARIES - List of libraries when using libFLAC.
|
||||
# FLAC_FOUND - True if libFLAC found.
|
||||
# FLAC_DEFINITIONS - FLAC compile definitons
|
||||
|
||||
if (FLAC_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set (FLAC_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
find_package (Ogg QUIET)
|
||||
|
||||
find_package (PkgConfig QUIET)
|
||||
pkg_check_modules(PC_FLAC QUIET flac)
|
||||
|
||||
set(FLAC_VERSION ${PC_FLAC_VERSION})
|
||||
|
||||
find_path (FLAC_INCLUDE_DIR FLAC/stream_decoder.h
|
||||
HINTS
|
||||
${PC_FLAC_INCLUDEDIR}
|
||||
${PC_FLAC_INCLUDE_DIRS}
|
||||
${FLAC_ROOT}
|
||||
)
|
||||
|
||||
# MSVC built libraries can name them *_static, which is good as it
|
||||
# distinguishes import libraries from static libraries with the same extension.
|
||||
find_library (FLAC_LIBRARY
|
||||
NAMES
|
||||
FLAC
|
||||
libFLAC
|
||||
libFLAC_dynamic
|
||||
libFLAC_static
|
||||
HINTS
|
||||
${PC_FLAC_LIBDIR}
|
||||
${PC_FLAC_LIBRARY_DIRS}
|
||||
${FLAC_ROOT}
|
||||
)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set FLAC_FOUND to TRUE if
|
||||
# all listed variables are TRUE.
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (FLAC
|
||||
REQUIRED_VARS
|
||||
FLAC_LIBRARY
|
||||
FLAC_INCLUDE_DIR
|
||||
Ogg_FOUND
|
||||
VERSION_VAR
|
||||
FLAC_VERSION
|
||||
)
|
||||
|
||||
if (FLAC_FOUND)
|
||||
set (FLAC_INCLUDE_DIRS ${FLAC_INCLUDE_DIR})
|
||||
set (FLAC_LIBRARIES ${FLAC_LIBRARY} ${OGG_LIBRARIES})
|
||||
if (NOT TARGET FLAC::FLAC)
|
||||
add_library(FLAC::FLAC UNKNOWN IMPORTED)
|
||||
set_target_properties(FLAC::FLAC PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${FLAC_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${FLAC_LIBRARY}"
|
||||
INTERFACE_LINK_LIBRARIES Ogg::ogg
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(FLAC_INCLUDE_DIR FLAC_LIBRARY)
|
61
deps/sndfile/lib/cmake/SndFile/FindOgg.cmake
vendored
Normal file
61
deps/sndfile/lib/cmake/SndFile/FindOgg.cmake
vendored
Normal file
|
@ -0,0 +1,61 @@
|
|||
# - Find ogg
|
||||
# Find the native ogg includes and libraries
|
||||
#
|
||||
# OGG_INCLUDE_DIRS - where to find ogg.h, etc.
|
||||
# OGG_LIBRARIES - List of libraries when using ogg.
|
||||
# OGG_FOUND - True if ogg found.
|
||||
|
||||
if (OGG_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set(OGG_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
find_package (PkgConfig QUIET)
|
||||
pkg_check_modules (PC_OGG QUIET ogg>=1.3.0)
|
||||
|
||||
set (OGG_VERSION ${PC_OGG_VERSION})
|
||||
|
||||
find_path (OGG_INCLUDE_DIR ogg/ogg.h
|
||||
HINTS
|
||||
${PC_OGG_INCLUDEDIR}
|
||||
${PC_OGG_INCLUDE_DIRS}
|
||||
${OGG_ROOT}
|
||||
)
|
||||
# MSVC built ogg may be named ogg_static.
|
||||
# The provided project files name the library with the lib prefix.
|
||||
find_library (OGG_LIBRARY
|
||||
NAMES
|
||||
ogg
|
||||
ogg_static
|
||||
libogg
|
||||
libogg_static
|
||||
HINTS
|
||||
${PC_OGG_LIBDIR}
|
||||
${PC_OGG_LIBRARY_DIRS}
|
||||
${OGG_ROOT}
|
||||
)
|
||||
# Handle the QUIETLY and REQUIRED arguments and set OGG_FOUND
|
||||
# to TRUE if all listed variables are TRUE.
|
||||
include (FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (Ogg
|
||||
REQUIRED_VARS
|
||||
OGG_LIBRARY
|
||||
OGG_INCLUDE_DIR
|
||||
VERSION_VAR
|
||||
OGG_VERSION
|
||||
)
|
||||
|
||||
if (OGG_FOUND)
|
||||
set (OGG_LIBRARIES ${OGG_LIBRARY})
|
||||
set (OGG_INCLUDE_DIRS ${OGG_INCLUDE_DIR})
|
||||
|
||||
if(NOT TARGET Ogg::ogg)
|
||||
add_library(Ogg::ogg UNKNOWN IMPORTED)
|
||||
set_target_properties(Ogg::ogg PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OGG_INCLUDE_DIRS}"
|
||||
IMPORTED_LOCATION "${OGG_LIBRARIES}"
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced (OGG_INCLUDE_DIR OGG_LIBRARY)
|
67
deps/sndfile/lib/cmake/SndFile/FindOpus.cmake
vendored
Normal file
67
deps/sndfile/lib/cmake/SndFile/FindOpus.cmake
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
# - Find opus
|
||||
# Find the native opus includes and libraries
|
||||
#
|
||||
# OPUS_INCLUDE_DIRS - where to find opus.h, etc.
|
||||
# OPUS_LIBRARIES - List of libraries when using opus.
|
||||
# OPUS_FOUND - True if Opus found.
|
||||
|
||||
if (OPUS_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set(OPUS_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
find_package (Ogg QUIET)
|
||||
|
||||
find_package (PkgConfig QUIET)
|
||||
pkg_check_modules(PC_OPUS QUIET opus>=1.1)
|
||||
|
||||
set (OPUS_VERSION ${PC_OPUS_VERSION})
|
||||
|
||||
find_path (OPUS_INCLUDE_DIR opus/opus.h
|
||||
HINTS
|
||||
${PC_OPUS_INCLUDEDIR}
|
||||
${PC_OPUS_INCLUDE_DIRS}
|
||||
${OPUS_ROOT}
|
||||
)
|
||||
|
||||
# MSVC built opus may be named opus_static.
|
||||
# The provided project files name the library with the lib prefix.
|
||||
|
||||
find_library (OPUS_LIBRARY
|
||||
NAMES
|
||||
opus
|
||||
opus_static
|
||||
libopus
|
||||
libopus_static
|
||||
HINTS
|
||||
${PC_OPUS_LIBDIR}
|
||||
${PC_OPUS_LIBRARY_DIRS}
|
||||
${OPUS_ROOT}
|
||||
)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set OPUS_FOUND
|
||||
# to TRUE if all listed variables are TRUE.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (Opus
|
||||
REQUIRED_VARS
|
||||
OPUS_LIBRARY
|
||||
OPUS_INCLUDE_DIR
|
||||
OGG_FOUND
|
||||
VERSION_VAR
|
||||
OPUS_VERSION
|
||||
)
|
||||
|
||||
if (OPUS_FOUND)
|
||||
set (OPUS_LIBRARIES ${OPUS_LIBRARY})
|
||||
set (OPUS_INCLUDE_DIRS ${OPUS_INCLUDE_DIR})
|
||||
|
||||
if (NOT TARGET Opus::opus)
|
||||
add_library (Opus::opus UNKNOWN IMPORTED)
|
||||
set_target_properties (Opus::opus PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${OPUS_INCLUDE_DIRS}"
|
||||
IMPORTED_LOCATION "${OPUS_LIBRARIES}"
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(OPUS_INCLUDE_DIR OPUS_LIBRARY)
|
210
deps/sndfile/lib/cmake/SndFile/FindVorbis.cmake
vendored
Normal file
210
deps/sndfile/lib/cmake/SndFile/FindVorbis.cmake
vendored
Normal file
|
@ -0,0 +1,210 @@
|
|||
#[=======================================================================[.rst:
|
||||
FindVorbis
|
||||
----------
|
||||
|
||||
Finds the native vorbis, vorbisenc amd vorbisfile includes and libraries.
|
||||
|
||||
Imported Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module provides the following imported targets, if found:
|
||||
|
||||
``Vorbis::vorbis``
|
||||
The Vorbis library
|
||||
``Vorbis::vorbisenc``
|
||||
The VorbisEnc library
|
||||
``Vorbis::vorbisfile``
|
||||
The VorbisFile library
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables:
|
||||
|
||||
``Vorbis_Vorbis_INCLUDE_DIRS``
|
||||
List of include directories when using vorbis.
|
||||
``Vorbis_Enc_INCLUDE_DIRS``
|
||||
List of include directories when using vorbisenc.
|
||||
``Vorbis_File_INCLUDE_DIRS``
|
||||
List of include directories when using vorbisfile.
|
||||
``Vorbis_Vorbis_LIBRARIES``
|
||||
List of libraries when using vorbis.
|
||||
``Vorbis_Enc_LIBRARIES``
|
||||
List of libraries when using vorbisenc.
|
||||
``Vorbis_File_LIBRARIES``
|
||||
List of libraries when using vorbisfile.
|
||||
``Vorbis_FOUND``
|
||||
True if vorbis and requested components found.
|
||||
``Vorbis_Vorbis_FOUND``
|
||||
True if vorbis found.
|
||||
``Vorbis_Enc_FOUND``
|
||||
True if vorbisenc found.
|
||||
``Vorbis_Enc_FOUND``
|
||||
True if vorbisfile found.
|
||||
|
||||
Cache variables
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The following cache variables may also be set:
|
||||
|
||||
``Vorbis_Vorbis_INCLUDE_DIR``
|
||||
The directory containing ``vorbis/vorbis.h``.
|
||||
``Vorbis_Enc_INCLUDE_DIR``
|
||||
The directory containing ``vorbis/vorbisenc.h``.
|
||||
``Vorbis_File_INCLUDE_DIR``
|
||||
The directory containing ``vorbis/vorbisenc.h``.
|
||||
``Vorbis_Vorbis_LIBRARY``
|
||||
The path to the vorbis library.
|
||||
``Vorbis_Enc_LIBRARY``
|
||||
The path to the vorbisenc library.
|
||||
``Vorbis_File_LIBRARY``
|
||||
The path to the vorbisfile library.
|
||||
|
||||
Hints
|
||||
^^^^^
|
||||
|
||||
A user may set ``Vorbis_ROOT`` to a vorbis installation root to tell this module where to look.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
if (Vorbis_Vorbis_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set (Vorbis_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
set (Vorbis_Vorbis_FIND_QUIETLY TRUE)
|
||||
set (Vorbis_Enc_FIND_QUIETLY TRUE)
|
||||
set (Vorbis_File_FIND_QUIETLY TRUE)
|
||||
|
||||
find_package (Ogg QUIET)
|
||||
|
||||
find_package (PkgConfig QUIET)
|
||||
pkg_check_modules (PC_Vorbis_Vorbis QUIET vorbis)
|
||||
pkg_check_modules (PC_Vorbis_Enc QUIET vorbisenc)
|
||||
pkg_check_modules (PC_Vorbis_File QUIET vorbisfile)
|
||||
|
||||
set (Vorbis_VERSION ${PC_Vorbis_Vorbis_VERSION})
|
||||
|
||||
find_path (Vorbis_Vorbis_INCLUDE_DIR vorbis/codec.h
|
||||
HINTS
|
||||
${PC_Vorbis_Vorbis_INCLUDEDIR}
|
||||
${PC_Vorbis_Vorbis_INCLUDE_DIRS}
|
||||
${Vorbis_ROOT}
|
||||
)
|
||||
|
||||
find_path (Vorbis_Enc_INCLUDE_DIR vorbis/vorbisenc.h
|
||||
HINTS
|
||||
${PC_Vorbis_Enc_INCLUDEDIR}
|
||||
${PC_Vorbis_Enc_INCLUDE_DIRS}
|
||||
${Vorbis_ROOT}
|
||||
)
|
||||
|
||||
find_path (Vorbis_File_INCLUDE_DIR vorbis/vorbisfile.h
|
||||
HINTS
|
||||
${PC_Vorbis_File_INCLUDEDIR}
|
||||
${PC_Vorbis_File_INCLUDE_DIRS}
|
||||
${Vorbis_ROOT}
|
||||
)
|
||||
|
||||
find_library (Vorbis_Vorbis_LIBRARY
|
||||
NAMES
|
||||
vorbis
|
||||
vorbis_static
|
||||
libvorbis
|
||||
libvorbis_static
|
||||
HINTS
|
||||
${PC_Vorbis_Vorbis_LIBDIR}
|
||||
${PC_Vorbis_Vorbis_LIBRARY_DIRS}
|
||||
${Vorbis_ROOT}
|
||||
)
|
||||
|
||||
find_library (Vorbis_Enc_LIBRARY
|
||||
NAMES
|
||||
vorbisenc
|
||||
vorbisenc_static
|
||||
libvorbisenc
|
||||
libvorbisenc_static
|
||||
HINTS
|
||||
${PC_Vorbis_Enc_LIBDIR}
|
||||
${PC_Vorbis_Enc_LIBRARY_DIRS}
|
||||
${Vorbis_ROOT}
|
||||
)
|
||||
|
||||
find_library (Vorbis_File_LIBRARY
|
||||
NAMES
|
||||
vorbisfile
|
||||
vorbisfile_static
|
||||
libvorbisfile
|
||||
libvorbisfile_static
|
||||
HINTS
|
||||
${PC_Vorbis_File_LIBDIR}
|
||||
${PC_Vorbis_File_LIBRARY_DIRS}
|
||||
${Vorbis_ROOT}
|
||||
)
|
||||
|
||||
include (FindPackageHandleStandardArgs)
|
||||
|
||||
if (Vorbis_Vorbis_LIBRARY AND Vorbis_Vorbis_INCLUDE_DIR AND Ogg_FOUND)
|
||||
set (Vorbis_Vorbis_FOUND TRUE)
|
||||
endif ()
|
||||
|
||||
if (Vorbis_Enc_LIBRARY AND Vorbis_Enc_INCLUDE_DIR AND Vorbis_Vorbis_FOUND)
|
||||
set (Vorbis_Enc_FOUND TRUE)
|
||||
endif ()
|
||||
|
||||
if (Vorbis_Vorbis_FOUND AND Vorbis_File_LIBRARY AND Vorbis_File_INCLUDE_DIR)
|
||||
set (Vorbis_File_FOUND TRUE)
|
||||
endif ()
|
||||
|
||||
find_package_handle_standard_args (Vorbis
|
||||
REQUIRED_VARS
|
||||
Vorbis_Vorbis_LIBRARY
|
||||
Vorbis_Vorbis_INCLUDE_DIR
|
||||
Ogg_FOUND
|
||||
HANDLE_COMPONENTS
|
||||
VERSION_VAR Vorbis_VERSION)
|
||||
|
||||
|
||||
if (Vorbis_Vorbis_FOUND)
|
||||
set (Vorbis_Vorbis_INCLUDE_DIRS ${VORBIS_INCLUDE_DIR})
|
||||
set (Vorbis_Vorbis_LIBRARIES ${VORBIS_LIBRARY} ${OGG_LIBRARIES})
|
||||
if (NOT TARGET Vorbis::vorbis)
|
||||
add_library (Vorbis::vorbis UNKNOWN IMPORTED)
|
||||
set_target_properties (Vorbis::vorbis PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Vorbis_Vorbis_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${Vorbis_Vorbis_LIBRARY}"
|
||||
INTERFACE_LINK_LIBRARIES Ogg::ogg
|
||||
)
|
||||
endif ()
|
||||
|
||||
if (Vorbis_Enc_FOUND)
|
||||
set (Vorbis_Enc_INCLUDE_DIRS ${Vorbis_Enc_INCLUDE_DIR})
|
||||
set (Vorbis_Enc_LIBRARIES ${Vorbis_Enc_LIBRARY} ${Vorbis_Enc_LIBRARIES})
|
||||
if (NOT TARGET Vorbis::vorbisenc)
|
||||
add_library (Vorbis::vorbisenc UNKNOWN IMPORTED)
|
||||
set_target_properties (Vorbis::vorbisenc PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Vorbis_Enc_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${Vorbis_Enc_LIBRARY}"
|
||||
INTERFACE_LINK_LIBRARIES Vorbis::vorbis
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
if (Vorbis_File_FOUND)
|
||||
set (Vorbis_File_INCLUDE_DIRS ${Vorbis_File_INCLUDE_DIR})
|
||||
set (Vorbis_File_LIBRARIES ${Vorbis_File_LIBRARY} ${Vorbis_File_LIBRARIES})
|
||||
if (NOT TARGET Vorbis::vorbisfile)
|
||||
add_library (Vorbis::vorbisfile UNKNOWN IMPORTED)
|
||||
set_target_properties (Vorbis::vorbisfile PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${Vorbis_File_INCLUDE_DIR}"
|
||||
IMPORTED_LOCATION "${Vorbis_File_LIBRARY}"
|
||||
INTERFACE_LINK_LIBRARIES Vorbis::vorbis
|
||||
)
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
endif ()
|
||||
|
||||
mark_as_advanced (Vorbis_Vorbis_INCLUDE_DIR Vorbis_Vorbis_LIBRARY)
|
||||
mark_as_advanced (Vorbis_Enc_INCLUDE_DIR Vorbis_Enc_LIBRARY)
|
||||
mark_as_advanced (Vorbis_File_INCLUDE_DIR Vorbis_File_LIBRARY)
|
67
deps/sndfile/lib/cmake/SndFile/Findmp3lame.cmake
vendored
Normal file
67
deps/sndfile/lib/cmake/SndFile/Findmp3lame.cmake
vendored
Normal file
|
@ -0,0 +1,67 @@
|
|||
# - Find lame
|
||||
# Find the native lame includes and libraries
|
||||
#
|
||||
# MP3LAME_INCLUDE_DIRS - where to find lame.h, etc.
|
||||
# MP3LAME_LIBRARIES - List of libraries when using lame.
|
||||
# MP3LAME_FOUND - True if Lame found.
|
||||
|
||||
if (MP3LAME_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set(MP3LAME_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
find_path (MP3LAME_INCLUDE_DIR lame/lame.h
|
||||
HINTS
|
||||
${LAME_ROOT}
|
||||
)
|
||||
|
||||
# MSVC built lame may be named mp3lame_static.
|
||||
# The provided project files name the library with the lib prefix.
|
||||
|
||||
find_library (MP3LAME_LIBRARY
|
||||
NAMES
|
||||
mp3lame
|
||||
mp3lame_static
|
||||
libmp3lame
|
||||
libmp3lame_static
|
||||
libmp3lame-static
|
||||
HINTS
|
||||
${MP3LAME_ROOT}
|
||||
)
|
||||
|
||||
find_library (MP3LAME_HIP_LIBRARY
|
||||
NAMES
|
||||
mpghip-static
|
||||
libmpghip-static
|
||||
HINTS
|
||||
${MP3LAME_ROOT}
|
||||
)
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set LAME_FOUND
|
||||
# to TRUE if all listed variables are TRUE.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (mp3lame
|
||||
REQUIRED_VARS
|
||||
MP3LAME_LIBRARY
|
||||
MP3LAME_INCLUDE_DIR
|
||||
)
|
||||
|
||||
if (MP3LAME_FOUND)
|
||||
set (MP3LAME_LIBRARIES ${MP3LAME_LIBRARY} ${MP3LAME_HIP_LIBRARY})
|
||||
set (MP3LAME_INCLUDE_DIRS ${MP3LAME_INCLUDE_DIR})
|
||||
|
||||
if (NOT TARGET mp3lame::mp3lame)
|
||||
add_library (mp3lame::mp3lame UNKNOWN IMPORTED)
|
||||
set_target_properties (mp3lame::mp3lame PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${MP3LAME_INCLUDE_DIRS}"
|
||||
IMPORTED_LOCATION "${MP3LAME_LIBRARY}"
|
||||
)
|
||||
if (MP3LAME_HIP_LIBRARY AND (NOT TARGET mp3lame::mpghip))
|
||||
add_library (mp3lame::mpghip STATIC IMPORTED)
|
||||
set_property (mp3lame::mpghip PROPERTY IMPORTED_LOCATION "${MP3LAME_HIP_LIBRARY}")
|
||||
set_property (TARGET mp3lame::mp3lame PROPERTY INTERFACE_LINK_LIBRARIES "mp3lame::mpghip")
|
||||
endif ()
|
||||
endif ()
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(MP3LAME_INCLUDE_DIR MP3LAME_LIBRARY MP3LAME_HIP_LIBRARY)
|
95
deps/sndfile/lib/cmake/SndFile/Findmpg123.cmake
vendored
Normal file
95
deps/sndfile/lib/cmake/SndFile/Findmpg123.cmake
vendored
Normal file
|
@ -0,0 +1,95 @@
|
|||
#[=======================================================================[.rst:
|
||||
Findmpg123
|
||||
-------
|
||||
|
||||
Finds the mpg123 library.
|
||||
|
||||
Imported Targets
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This module provides the following imported targets, if found:
|
||||
|
||||
``MPG123::libmpg123``
|
||||
The mpg123 library
|
||||
|
||||
Result Variables
|
||||
^^^^^^^^^^^^^^^^
|
||||
|
||||
This will define the following variables:
|
||||
|
||||
``mpg123_FOUND``
|
||||
True if the system has the mpg123 package.
|
||||
``mpg123_VERSION``
|
||||
The version of mpg123 that was found on the system.
|
||||
|
||||
Cache Variables
|
||||
^^^^^^^^^^^^^^^
|
||||
|
||||
The following cache variables may also be set:
|
||||
|
||||
``mpg123_INCLUDE_DIR``
|
||||
The directory containing ``mpg123.h``.
|
||||
``mpg123_LIBRARY``
|
||||
The path to the mpg123 library.
|
||||
|
||||
#]=======================================================================]
|
||||
|
||||
if (mpg123_INCLUDE_DIR)
|
||||
# Already in cache, be silent
|
||||
set(mpg123_FIND_QUIETLY TRUE)
|
||||
endif ()
|
||||
|
||||
find_package (PkgConfig QUIET)
|
||||
pkg_check_modules(PC_MPG123 QUIET libmpg123>=1.25.10)
|
||||
|
||||
find_path (mpg123_INCLUDE_DIR mpg123.h
|
||||
HINTS
|
||||
${PC_MPG123_INCLUDEDIR}
|
||||
${PC_MPG123_INCLUDE_DIRS}
|
||||
${mpg123_ROOT}
|
||||
)
|
||||
|
||||
# MSVC built mpg123 may be named mpg123_static.
|
||||
# The provided project files name the library with the lib prefix.
|
||||
|
||||
find_library (mpg123_LIBRARY
|
||||
NAMES
|
||||
mpg123
|
||||
mpg123_static
|
||||
libmpg123
|
||||
libmpg123_static
|
||||
HINTS
|
||||
${PC_MPG123_LIBDIR}
|
||||
${PC_MPG123_LIBRARY_DIRS}
|
||||
${mpg123_ROOT}
|
||||
)
|
||||
|
||||
if (PC_MPG123_FOUND)
|
||||
set (mpg123_VERSION ${PC_MPG123_VERSION})
|
||||
elseif (mpg123_INCLUDE_DIR)
|
||||
file (READ "${mpg123_INCLUDE_DIR}/mpg123.h" _mpg123_h)
|
||||
string (REGEX MATCH "[0-9]+.[0-9]+.[0-9]+" _mpg123_version_re "${_mpg123_h}")
|
||||
set (mpg123_VERSION "${_mpg123_version_re}")
|
||||
endif ()
|
||||
|
||||
# Handle the QUIETLY and REQUIRED arguments and set mpg123_FOUND
|
||||
# to TRUE if all listed variables are TRUE.
|
||||
include(FindPackageHandleStandardArgs)
|
||||
find_package_handle_standard_args (mpg123
|
||||
REQUIRED_VARS
|
||||
mpg123_LIBRARY
|
||||
mpg123_INCLUDE_DIR
|
||||
VERSION_VAR
|
||||
mpg123_VERSION
|
||||
)
|
||||
|
||||
if (mpg123_FOUND AND NOT TARGET MPG123::libmpg123)
|
||||
add_library (MPG123::libmpg123 UNKNOWN IMPORTED)
|
||||
set_target_properties (MPG123::libmpg123
|
||||
PROPERTIES
|
||||
IMPORTED_LOCATION "${mpg123_LIBRARY}"
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${mpg123_INCLUDE_DIR}"
|
||||
)
|
||||
endif ()
|
||||
|
||||
mark_as_advanced(mpg123_INCLUDE_DIR mpg123_LIBRARY)
|
|
@ -1,7 +1,7 @@
|
|||
set(SndFile_VERSION 1.2.0)
|
||||
set(SndFile_VERSION 1.2.2)
|
||||
set(SndFile_VERSION_MAJOR 1)
|
||||
set(SndFile_VERSION_MINOR 2)
|
||||
set(SndFile_VERSION_PATCH 0)
|
||||
set(SndFile_VERSION_PATCH 2)
|
||||
|
||||
set (SndFile_WITH_EXTERNAL_LIBS 1)
|
||||
set (SndFile_WITH_MPEG 1)
|
||||
|
@ -34,6 +34,10 @@ endmacro()
|
|||
|
||||
include (CMakeFindDependencyMacro)
|
||||
|
||||
if (NOT NO)
|
||||
list (APPEND CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
||||
endif ()
|
||||
|
||||
if (SndFile_WITH_EXTERNAL_LIBS AND NOT NO)
|
||||
find_dependency (Ogg 1.3)
|
||||
find_dependency (Vorbis)
|
||||
|
@ -43,7 +47,11 @@ endif ()
|
|||
|
||||
if (SndFile_WITH_MPEG AND NOT NO)
|
||||
find_dependency (mp3lame)
|
||||
find_dependency (MPG123)
|
||||
find_dependency (mpg123)
|
||||
endif ()
|
||||
|
||||
if (NOT NO)
|
||||
list (REMOVE_ITEM CMAKE_MODULE_PATH ${CMAKE_CURRENT_LIST_DIR})
|
||||
endif ()
|
||||
|
||||
include (${CMAKE_CURRENT_LIST_DIR}/SndFileTargets.cmake)
|
||||
|
|
|
@ -9,19 +9,19 @@
|
|||
# The variable CVF_VERSION must be set before calling configure_file().
|
||||
|
||||
|
||||
set(PACKAGE_VERSION "1.2.0")
|
||||
set(PACKAGE_VERSION "1.2.2")
|
||||
|
||||
if(PACKAGE_VERSION VERSION_LESS PACKAGE_FIND_VERSION)
|
||||
set(PACKAGE_VERSION_COMPATIBLE FALSE)
|
||||
else()
|
||||
|
||||
if("1.2.0" MATCHES "^([0-9]+)\\.")
|
||||
if("1.2.2" MATCHES "^([0-9]+)\\.")
|
||||
set(CVF_VERSION_MAJOR "${CMAKE_MATCH_1}")
|
||||
if(NOT CVF_VERSION_MAJOR VERSION_EQUAL 0)
|
||||
string(REGEX REPLACE "^0+" "" CVF_VERSION_MAJOR "${CVF_VERSION_MAJOR}")
|
||||
endif()
|
||||
else()
|
||||
set(CVF_VERSION_MAJOR "1.2.0")
|
||||
set(CVF_VERSION_MAJOR "1.2.2")
|
||||
endif()
|
||||
|
||||
if(PACKAGE_FIND_VERSION_RANGE)
|
||||
|
|
|
@ -12,8 +12,8 @@ set_target_properties(SndFile::sndfile PROPERTIES
|
|||
IMPORTED_LOCATION_RELEASE "${_IMPORT_PREFIX}/lib/libsndfile.a"
|
||||
)
|
||||
|
||||
list(APPEND _IMPORT_CHECK_TARGETS SndFile::sndfile )
|
||||
list(APPEND _IMPORT_CHECK_FILES_FOR_SndFile::sndfile "${_IMPORT_PREFIX}/lib/libsndfile.a" )
|
||||
list(APPEND _cmake_import_check_targets SndFile::sndfile )
|
||||
list(APPEND _cmake_import_check_files_for_SndFile::sndfile "${_IMPORT_PREFIX}/lib/libsndfile.a" )
|
||||
|
||||
# Commands beyond this point should not need to know the version.
|
||||
set(CMAKE_IMPORT_FILE_VERSION)
|
||||
|
|
|
@ -1,10 +1,13 @@
|
|||
# Generated by CMake
|
||||
|
||||
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.5)
|
||||
message(FATAL_ERROR "CMake >= 2.6.0 required")
|
||||
if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" LESS 2.8)
|
||||
message(FATAL_ERROR "CMake >= 2.8.0 required")
|
||||
endif()
|
||||
if(CMAKE_VERSION VERSION_LESS "2.8.3")
|
||||
message(FATAL_ERROR "CMake >= 2.8.3 required")
|
||||
endif()
|
||||
cmake_policy(PUSH)
|
||||
cmake_policy(VERSION 2.6...3.19)
|
||||
cmake_policy(VERSION 2.8.3...3.23)
|
||||
#----------------------------------------------------------------
|
||||
# Generated CMake target import file.
|
||||
#----------------------------------------------------------------
|
||||
|
@ -13,32 +16,34 @@ cmake_policy(VERSION 2.6...3.19)
|
|||
set(CMAKE_IMPORT_FILE_VERSION 1)
|
||||
|
||||
# Protect against multiple inclusion, which would fail when already imported targets are added once more.
|
||||
set(_targetsDefined)
|
||||
set(_targetsNotDefined)
|
||||
set(_expectedTargets)
|
||||
foreach(_expectedTarget SndFile::sndfile)
|
||||
list(APPEND _expectedTargets ${_expectedTarget})
|
||||
if(NOT TARGET ${_expectedTarget})
|
||||
list(APPEND _targetsNotDefined ${_expectedTarget})
|
||||
endif()
|
||||
if(TARGET ${_expectedTarget})
|
||||
list(APPEND _targetsDefined ${_expectedTarget})
|
||||
set(_cmake_targets_defined "")
|
||||
set(_cmake_targets_not_defined "")
|
||||
set(_cmake_expected_targets "")
|
||||
foreach(_cmake_expected_target IN ITEMS SndFile::sndfile)
|
||||
list(APPEND _cmake_expected_targets "${_cmake_expected_target}")
|
||||
if(TARGET "${_cmake_expected_target}")
|
||||
list(APPEND _cmake_targets_defined "${_cmake_expected_target}")
|
||||
else()
|
||||
list(APPEND _cmake_targets_not_defined "${_cmake_expected_target}")
|
||||
endif()
|
||||
endforeach()
|
||||
if("${_targetsDefined}" STREQUAL "${_expectedTargets}")
|
||||
unset(_targetsDefined)
|
||||
unset(_targetsNotDefined)
|
||||
unset(_expectedTargets)
|
||||
set(CMAKE_IMPORT_FILE_VERSION)
|
||||
unset(_cmake_expected_target)
|
||||
if(_cmake_targets_defined STREQUAL _cmake_expected_targets)
|
||||
unset(_cmake_targets_defined)
|
||||
unset(_cmake_targets_not_defined)
|
||||
unset(_cmake_expected_targets)
|
||||
unset(CMAKE_IMPORT_FILE_VERSION)
|
||||
cmake_policy(POP)
|
||||
return()
|
||||
endif()
|
||||
if(NOT "${_targetsDefined}" STREQUAL "")
|
||||
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_targetsDefined}\nTargets not yet defined: ${_targetsNotDefined}\n")
|
||||
if(NOT _cmake_targets_defined STREQUAL "")
|
||||
string(REPLACE ";" ", " _cmake_targets_defined_text "${_cmake_targets_defined}")
|
||||
string(REPLACE ";" ", " _cmake_targets_not_defined_text "${_cmake_targets_not_defined}")
|
||||
message(FATAL_ERROR "Some (but not all) targets in this export set were already defined.\nTargets Defined: ${_cmake_targets_defined_text}\nTargets not yet defined: ${_cmake_targets_not_defined_text}\n")
|
||||
endif()
|
||||
unset(_targetsDefined)
|
||||
unset(_targetsNotDefined)
|
||||
unset(_expectedTargets)
|
||||
unset(_cmake_targets_defined)
|
||||
unset(_cmake_targets_not_defined)
|
||||
unset(_cmake_expected_targets)
|
||||
|
||||
|
||||
# Compute the installation prefix relative to this file.
|
||||
|
@ -55,7 +60,7 @@ add_library(SndFile::sndfile STATIC IMPORTED)
|
|||
|
||||
set_target_properties(SndFile::sndfile PROPERTIES
|
||||
INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include"
|
||||
INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:\$<\$<BOOL:1>:m>>;\$<LINK_ONLY:\$<\$<BOOL:ON>:Vorbis::vorbisenc>>;\$<LINK_ONLY:\$<\$<BOOL:ON>:FLAC::FLAC>>;\$<LINK_ONLY:\$<\$<AND:\$<BOOL:OFF>,\$<BOOL:ON>,\$<BOOL:OFF>>:Speex::Speex>>;\$<LINK_ONLY:\$<\$<BOOL:ON>:Opus::opus>>;\$<LINK_ONLY:\$<\$<BOOL:ON>:MPG123::libmpg123>>;\$<LINK_ONLY:\$<\$<BOOL:ON>:mp3lame::mp3lame>>"
|
||||
INTERFACE_LINK_LIBRARIES "\$<LINK_ONLY:\$<\$<BOOL:1>:m>>;\$<LINK_ONLY:\$<\$<BOOL:ON>:Ogg::ogg>>;\$<LINK_ONLY:\$<\$<BOOL:ON>:Vorbis::vorbisenc>>;\$<LINK_ONLY:\$<\$<BOOL:ON>:FLAC::FLAC>>;\$<LINK_ONLY:\$<\$<AND:\$<BOOL:OFF>,\$<BOOL:ON>,\$<BOOL:OFF>>:Speex::Speex>>;\$<LINK_ONLY:\$<\$<BOOL:ON>:Opus::opus>>;\$<LINK_ONLY:\$<\$<BOOL:ON>:MPG123::libmpg123>>;\$<LINK_ONLY:\$<\$<BOOL:ON>:mp3lame::mp3lame>>"
|
||||
)
|
||||
|
||||
if(CMAKE_VERSION VERSION_LESS 2.8.12)
|
||||
|
@ -63,21 +68,22 @@ if(CMAKE_VERSION VERSION_LESS 2.8.12)
|
|||
endif()
|
||||
|
||||
# Load information for each installed configuration.
|
||||
get_filename_component(_DIR "${CMAKE_CURRENT_LIST_FILE}" PATH)
|
||||
file(GLOB CONFIG_FILES "${_DIR}/SndFileTargets-*.cmake")
|
||||
foreach(f ${CONFIG_FILES})
|
||||
include(${f})
|
||||
file(GLOB _cmake_config_files "${CMAKE_CURRENT_LIST_DIR}/SndFileTargets-*.cmake")
|
||||
foreach(_cmake_config_file IN LISTS _cmake_config_files)
|
||||
include("${_cmake_config_file}")
|
||||
endforeach()
|
||||
unset(_cmake_config_file)
|
||||
unset(_cmake_config_files)
|
||||
|
||||
# Cleanup temporary variables.
|
||||
set(_IMPORT_PREFIX)
|
||||
|
||||
# Loop over all imported files and verify that they actually exist
|
||||
foreach(target ${_IMPORT_CHECK_TARGETS} )
|
||||
foreach(file ${_IMPORT_CHECK_FILES_FOR_${target}} )
|
||||
if(NOT EXISTS "${file}" )
|
||||
message(FATAL_ERROR "The imported target \"${target}\" references the file
|
||||
\"${file}\"
|
||||
foreach(_cmake_target IN LISTS _cmake_import_check_targets)
|
||||
foreach(_cmake_file IN LISTS "_cmake_import_check_files_for_${_cmake_target}")
|
||||
if(NOT EXISTS "${_cmake_file}")
|
||||
message(FATAL_ERROR "The imported target \"${_cmake_target}\" references the file
|
||||
\"${_cmake_file}\"
|
||||
but this file does not exist. Possible reasons include:
|
||||
* The file was deleted, renamed, or moved to another location.
|
||||
* An install or uninstall procedure did not complete successfully.
|
||||
|
@ -87,9 +93,11 @@ but not all the files it references.
|
|||
")
|
||||
endif()
|
||||
endforeach()
|
||||
unset(_IMPORT_CHECK_FILES_FOR_${target})
|
||||
unset(_cmake_file)
|
||||
unset("_cmake_import_check_files_for_${_cmake_target}")
|
||||
endforeach()
|
||||
unset(_IMPORT_CHECK_TARGETS)
|
||||
unset(_cmake_target)
|
||||
unset(_cmake_import_check_targets)
|
||||
|
||||
# This file does not depend on other imported targets which have
|
||||
# been exported from the same project but in a separate export set.
|
||||
|
|
BIN
deps/sndfile/lib/libsndfile.a
vendored
BIN
deps/sndfile/lib/libsndfile.a
vendored
Binary file not shown.
2
deps/sndfile/lib/pkgconfig/sndfile.pc
vendored
2
deps/sndfile/lib/pkgconfig/sndfile.pc
vendored
|
@ -7,7 +7,7 @@ Name: sndfile
|
|||
Description: A library for reading and writing audio files
|
||||
Requires:
|
||||
Requires.private: flac ogg vorbis vorbisenc opus libmpg123
|
||||
Version: 1.2.0
|
||||
Version: 1.2.2
|
||||
Libs: -L${libdir} -lsndfile
|
||||
Libs.private: -lmp3lame
|
||||
Cflags: -I${includedir}
|
||||
|
|
Loading…
Reference in a new issue