$(eval $(call import.MODULE.defs,LIBDAV1D,libdav1d,PTHREADW32))
$(eval $(call import.CONTRIB.defs,LIBDAV1D))

LIBDAV1D.FETCH.url     = https://download.handbrake.fr/handbrake/contrib/dav1d-0.5.1.tar.bz2
LIBDAV1D.FETCH.url    += https://code.videolan.org/videolan/dav1d/-/archive/0.5.1/dav1d-0.5.1.tar.bz2
LIBDAV1D.FETCH.sha256  = 0214d201a338e8418f805b68f9ad277e33d79c18594dee6eaf6dcd74db2674a9

LIBDAV1D.build_dir     = build/

LIBDAV1D.CONFIGURE.exe    = $(MESON.exe)
LIBDAV1D.CONFIGURE.deps   =
LIBDAV1D.CONFIGURE.shared =
LIBDAV1D.CONFIGURE.host   =
LIBDAV1D.CONFIGURE.build  =
LIBDAV1D.CONFIGURE.static = -Ddefault_library=static
LIBDAV1D.CONFIGURE.extra  = --libdir=$(call fn.ABSOLUTE,$(CONTRIB.build/))lib/ --buildtype=release \
                            -Denable_tools=false -Denable_tests=false
LIBDAV1D.CONFIGURE.env    =

ifeq (1-mingw,$(HOST.cross)-$(HOST.system))
    LIBDAV1D.CONFIGURE.extra += --cross-file=$(call fn.ABSOLUTE,$(LIBDAV1D.EXTRACT.dir/))x86_64-w64-mingw32.meson
endif

LIBDAV1D.BUILD.make       = $(NINJA.exe)
LIBDAV1D.BUILD.extra      = -v

LIBDAV1D.INSTALL.make     = $(NINJA.exe)

LIBDAV1D.CLEAN.make       = $(NINJA.exe)
