From fa24d1d2238f0f9d9eb9b10c8701e28eb529a8d6 Mon Sep 17 00:00:00 2001 From: DeaDDooMER Date: Mon, 7 Oct 2019 22:07:11 +0300 Subject: [PATCH] fix link libraries on osx --- src/lib/miniupnpc/miniupnpc.pas | 3 ++- src/lib/modplug/modplug.pas | 5 +++-- src/lib/mpg123/mpg123.pas | 3 ++- src/lib/openal/al.pas | 2 ++ src/lib/vorbis/ogg.pas | 3 ++- src/lib/vorbis/vorbis.pas | 6 ++++-- 6 files changed, 15 insertions(+), 7 deletions(-) diff --git a/src/lib/miniupnpc/miniupnpc.pas b/src/lib/miniupnpc/miniupnpc.pas index 3a6f083..c8ad676 100644 --- a/src/lib/miniupnpc/miniupnpc.pas +++ b/src/lib/miniupnpc/miniupnpc.pas @@ -25,7 +25,8 @@ interface {$DEFINE MINIUPNPC_IMPL := cdecl; external 'miniupnpc.dll'} {$ENDIF} {$ELSE} - {$DEFINE MINIUPNPC_IMPL := cdecl; external 'miniupnpc'} + {$LINKLIB libminiupnpc} + {$DEFINE MINIUPNPC_IMPL := cdecl; external 'libminiupnpc'} {$ENDIF} const MINIUPNPC_URL_MAXSIZE=128; diff --git a/src/lib/modplug/modplug.pas b/src/lib/modplug/modplug.pas index 3c56ea1..cc6e914 100644 --- a/src/lib/modplug/modplug.pas +++ b/src/lib/modplug/modplug.pas @@ -29,9 +29,10 @@ uses {$ENDIF} {$ELSEIF DEFINED(UNIX)} {$DEFINE MP_DYNAMIC} - const modpluglib = 'libmodplug.so'; + {$LINKLIB libmodplug} + const modpluglib = 'libmodplug'; {$ELSE} - {$ERROR libmpg123 not supported on this platform. Fix it!} + {$ERROR libmodplug not supported on this platform. Fix it!} {$ENDIF} type diff --git a/src/lib/mpg123/mpg123.pas b/src/lib/mpg123/mpg123.pas index 67cab97..9ba1f6b 100644 --- a/src/lib/mpg123/mpg123.pas +++ b/src/lib/mpg123/mpg123.pas @@ -37,7 +37,8 @@ uses {$ENDIF} {$ELSEIF DEFINED(UNIX)} {$DEFINE MPG123_DYNAMIC} - const LIB_MPG123 = 'libmpg123.so'; + {$LINKLIB libmpg123} + const LIB_MPG123 = 'libmpg123'; {$ELSE} {$ERROR libmpg123 not supported on this platform. Fix it!} {$ENDIF} diff --git a/src/lib/openal/al.pas b/src/lib/openal/al.pas index ee62cd1..d762800 100644 --- a/src/lib/openal/al.pas +++ b/src/lib/openal/al.pas @@ -20,6 +20,8 @@ uses const openallib = 'openal32.dll'; {$DEFINE AL_DYNAMIC} {$ENDIF} +{$ELSEIF DEFINED(DARWIN)} + {$LINKFRAMEWORK OpenAL} {$ELSEIF DEFINED(UNIX)} const openallib = 'libopenal.so'; {$DEFINE AL_DYNAMIC} diff --git a/src/lib/vorbis/ogg.pas b/src/lib/vorbis/ogg.pas index 9ce03af..4559d35 100644 --- a/src/lib/vorbis/ogg.pas +++ b/src/lib/vorbis/ogg.pas @@ -35,7 +35,8 @@ uses {$ENDIF} {$ELSEIF DEFINED(UNIX)} {$DEFINE OGG_DYNAMIC} - const ogglib = 'libogg.so'; + {$LINKLIB libogg} + const ogglib = 'libogg'; {$ELSE} {$ERROR libogg not supported on this platform. Fix it!} {$ENDIF} diff --git a/src/lib/vorbis/vorbis.pas b/src/lib/vorbis/vorbis.pas index a2787be..87833bd 100644 --- a/src/lib/vorbis/vorbis.pas +++ b/src/lib/vorbis/vorbis.pas @@ -37,8 +37,10 @@ uses {$ENDIF} {$ELSEIF DEFINED(UNIX)} {$DEFINE OGG_DYNAMIC} - const vorbislib = 'libvorbis.so'; - const vorbisfilelib = 'libvorbisfile.so'; + {$LINKLIB libvorbis} + {$LINKLIB libvorbisfile} + const vorbislib = 'libvorbis'; + const vorbisfilelib = 'libvorbisfile'; {$ELSE} {$ERROR libvorbis not supported on this platform. Fix it!} {$ENDIF} -- 2.29.2