# Builds basic libraries needed by several other libraries.

Include "Tools.bawt"

# All of the following libraries can be compiled on Linux or Darwin,
# but it is better to use the system provided libraries.

# Setup LibName ZipFile            BuildFile       BuildOptions

# Basic library needed by most other libraries.
Setup ZLib      ZLib-1.3.1.7z      ZLib.bawt       NoLinux NoDarwin
Setup xz        xz-5.4.1.7z        xz.bawt         NoLinux NoDarwin

# Basic Image libraries.
Setup giflib    giflib-5.2.1.7z    giflib.bawt     NoLinux
Setup libwebp   libwebp-1.2.4.7z   libwebp.bawt    NoLinux
Setup JPEG      JPEG-9.f.7z        JPEG.bawt       NoLinux NoDarwin
Setup openjpeg  openjpeg-2.5.3.7z  openjpeg.bawt
Setup PNG       PNG-1.6.48.7z      PNG.bawt        NoLinux MaxParallel=Windows-gcc:1
Setup TIFF      TIFF-4.7.0.7z      TIFF.bawt       NoLinux NoDarwin

if { [IsGccCompilerNewer "4.9.0"] } {
    Setup ffmpeg  ffmpeg-7.1.2.7z  ffmpeg.bawt     NoLinux32-arm
} else {
    Setup ffmpeg  ffmpeg-4.4.4.7z  ffmpeg.bawt     NoLinux32-arm
}

Setup Freetype  Freetype-2.13.3.7z Freetype.bawt   NoLinux NoDarwin
if { [GetTlsVersion] == 1 } {
    Setup libressl libressl-2.9.2.7z libressl.bawt
} else {
    Setup openssl  openssl-3.5.1.7z  openssl.bawt
}

if { [UseVisualStudio "primary"] && [GetVisualStudioVersion] <= 2008 } {
    # Visual Studio 2008
    Setup SDL   SDL-2.0.4.7z       SDL.bawt
} elseif { [UseVisualStudio "primary"] && [GetVisualStudioVersion] == 2010 } {
    # Visual Studio 2010
    Setup SDL   SDL-2.0.8.7z       SDL.bawt
} else {
    Setup SDL   SDL-2.26.2.7z      SDL.bawt
}
