mirror of
https://gitee.com/openharmony/third_party_libsnd
synced 2024-11-26 19:40:24 +00:00
Update sndfile.pc for MPEG support
This commit is contained in:
parent
383e6e90e4
commit
85aea74e57
@ -210,6 +210,23 @@ if (INSTALL_PKGCONFIG_MODULE)
|
|||||||
set (EXTERNAL_XIPH_REQUIRE "${EXTERNAL_XIPH_REQUIRE} speex")
|
set (EXTERNAL_XIPH_REQUIRE "${EXTERNAL_XIPH_REQUIRE} speex")
|
||||||
endif ()
|
endif ()
|
||||||
endif ()
|
endif ()
|
||||||
|
if (ENABLE_MPEG)
|
||||||
|
set (EXTERNAL_MPEG_REQUIRE "libmpg123")
|
||||||
|
get_filename_component(LAME_WE ${LAME_LIBRARY} NAME_WE)
|
||||||
|
if (LAME_HIP_LIBRARY)
|
||||||
|
get_filename_component(LAME_HIP_WE ${LAME_HIP_LIBRARY} NAME_WE)
|
||||||
|
endif ()
|
||||||
|
if (CMAKE_IMPORT_LIBRARY_PREFIX)
|
||||||
|
string (REGEX REPLACE "^${CMAKE_IMPORT_LIBRARY_PREFIX}" "" LAME_WE_NO_PREFIX ${LAME_WE})
|
||||||
|
if (LAME_HIP_LIBRARY)
|
||||||
|
string (REGEX REPLACE "^${CMAKE_IMPORT_LIBRARY_PREFIX}" "" LAME_HIP_WE_NO_PREFIX ${LAME_HIP_WE})
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
set (EXTERNAL_MPEG_LIBS "-l${LAME_WE_NO_PREFIX}")
|
||||||
|
if (LAME_HIP_LIBRARY)
|
||||||
|
set (EXTERNAL_MPEG_LIBS "${MPEG_LIBS} -l${LAME_HIP_WE}")
|
||||||
|
endif ()
|
||||||
|
endif ()
|
||||||
|
|
||||||
configure_file (sndfile.pc.in sndfile.pc @ONLY)
|
configure_file (sndfile.pc.in sndfile.pc @ONLY)
|
||||||
|
|
||||||
|
@ -410,8 +410,8 @@ dnl Check for MPEG libraris liblame
|
|||||||
ac_cv_lame="no"
|
ac_cv_lame="no"
|
||||||
ac_cv_mpg123="no"
|
ac_cv_mpg123="no"
|
||||||
HAVE_MPEG=0
|
HAVE_MPEG=0
|
||||||
MPEG_CFLAGS=""
|
EXTERNAL_MPEG_REQUIRE=""
|
||||||
MPEG_LIBS=""
|
EXTERNAL_MPEG_LIBS=""
|
||||||
|
|
||||||
AS_IF([test -n "$PKG_CONFIG"], [
|
AS_IF([test -n "$PKG_CONFIG"], [
|
||||||
AS_IF([test "x$enable_mpeg" = "xno"], [
|
AS_IF([test "x$enable_mpeg" = "xno"], [
|
||||||
@ -436,6 +436,8 @@ AS_IF([test -n "$PKG_CONFIG"], [
|
|||||||
AS_IF([test "x$ac_cv_lame$ac_cv_mpg123" = "xyesyes"], [
|
AS_IF([test "x$ac_cv_lame$ac_cv_mpg123" = "xyesyes"], [
|
||||||
enable_mpeg="yes"
|
enable_mpeg="yes"
|
||||||
HAVE_MPEG=1
|
HAVE_MPEG=1
|
||||||
|
EXTERNAL_MPEG_REQUIRE="libmpg123"
|
||||||
|
EXTERNAL_MPEG_LIBS="-lmp3lame"
|
||||||
MPEG_CFLAGS="$MPG123_CFLAGS"
|
MPEG_CFLAGS="$MPG123_CFLAGS"
|
||||||
MPEG_LIBS="$MPG123_LIBS"
|
MPEG_LIBS="$MPG123_LIBS"
|
||||||
], [
|
], [
|
||||||
@ -736,6 +738,7 @@ AC_SUBST(SNDIO_LIBS)
|
|||||||
AC_SUBST(EXTERNAL_XIPH_CFLAGS)
|
AC_SUBST(EXTERNAL_XIPH_CFLAGS)
|
||||||
AC_SUBST(EXTERNAL_XIPH_LIBS)
|
AC_SUBST(EXTERNAL_XIPH_LIBS)
|
||||||
AC_SUBST(EXTERNAL_XIPH_REQUIRE)
|
AC_SUBST(EXTERNAL_XIPH_REQUIRE)
|
||||||
|
AC_SUBST(EXTERNAL_MPEG_REQUIRE)
|
||||||
AC_SUBST(MPG123_CFLAGS)
|
AC_SUBST(MPG123_CFLAGS)
|
||||||
AC_SUBST(MPG123_LIBS)
|
AC_SUBST(MPG123_LIBS)
|
||||||
AC_SUBST(MPEG_CFLAGS)
|
AC_SUBST(MPEG_CFLAGS)
|
||||||
|
@ -6,7 +6,8 @@ includedir=@includedir@
|
|||||||
Name: sndfile
|
Name: sndfile
|
||||||
Description: A library for reading and writing audio files
|
Description: A library for reading and writing audio files
|
||||||
Requires:
|
Requires:
|
||||||
Requires.private: @EXTERNAL_XIPH_REQUIRE@
|
Requires.private: @EXTERNAL_XIPH_REQUIRE@ @EXTERNAL_MPEG_REQUIRE@
|
||||||
Version: @VERSION@
|
Version: @VERSION@
|
||||||
Libs: -L${libdir} -lsndfile
|
Libs: -L${libdir} -lsndfile
|
||||||
|
Libs.private: @EXTERNAL_MPEG_LIBS@
|
||||||
Cflags: -I${includedir}
|
Cflags: -I${includedir}
|
||||||
|
Loading…
Reference in New Issue
Block a user