Use frameworks for libpng and Vorbis if requested and available

This commit is contained in:
Michael Martin
2019-11-16 23:29:56 -08:00
parent 2ad10b9906
commit fdb1a92d5d
3 changed files with 38 additions and 30 deletions
+21 -19
View File
@@ -116,8 +116,18 @@ LIB_libpng_NAME="libpng"
#
# To link against a static libpng, set LDFLAGS with an appropriate -L
# argument before calling `build.sh uqm config`.
LIB_libpng_CFLAGS=""
LIB_libpng_LDFLAGS="-lpng"
case "$HOST_SYSTEM" in
Darwin)
if not have_framework libpng; then
LIB_libpng_CFLAGS=""
LIB_libpng_LDFLAGS="-lpng"
fi
;;
*)
LIB_libpng_CFLAGS=""
LIB_libpng_LDFLAGS="-lpng"
;;
esac
### OpenAL ###
@@ -176,18 +186,6 @@ esac
LIB_opengl_VERSION=""
### Vorbis ###
LIB_vorbis_NAME="libvorbis"
LIB_vorbis_CFLAGS=""
LIB_vorbis_LDFLAGS="-lvorbis"
LIB_vorbis_VERSION=""
case "$HOST_SYSTEM" in
ARMV5|WINSCW|GCCE)
LIB_vorbis_DETECT="false"
;;
esac
### Vorbisfile ###
LIB_vorbisfile_NAME="vorbisfile"
case "$HOST_SYSTEM" in
@@ -200,8 +198,10 @@ case "$HOST_SYSTEM" in
LIB_vorbisfile_LDFLAGS="-lvorbisfile -lvorbis -lm -logg"
;;
Darwin)
LIB_vorbisfile_CFLAGS="-D__MACOSX__"
LIB_vorbisfile_LDFLAGS="-lvorbisfile -lvorbis"
if not have_framework vorbisfile Vorbis; then
LIB_vorbisfile_CFLAGS="-D__MACOSX__"
LIB_vorbisfile_LDFLAGS="-lvorbisfile -lvorbis"
fi
;;
QNX)
LIB_vorbisfile_CFLAGS=""
@@ -235,9 +235,11 @@ case "$HOST_SYSTEM" in
LIB_tremor_LDFLAGS="-L/usr/local/lib -lvorbisidec"
;;
Darwin)
# Assumed values - please let me know if you can verify this.
LIB_tremor_CFLAGS=""
LIB_tremor_LDFLAGS="-framework Tremor"
if not have_framework tremor Tremor; then
# Assumed values - please let me know if you can verify this.
LIB_tremor_CFLAGS=""
LIB_tremor_LDFLAGS="-framework Tremor"
fi
;;
ARMV5|WINSCW|GCCE)
LIB_tremor_DETECT="true"