aedi: enable webp support for sdl2_image

This commit is contained in:
alexey.lysiuk 2023-12-06 10:58:04 +02:00
parent 495f17d76f
commit c681e48434
2 changed files with 16 additions and 3 deletions

View file

@ -289,6 +289,18 @@ class Sdl2ImageTarget(base.CMakeStaticDependencyTarget):
'https://github.com/libsdl-org/SDL_image/releases/download/release-2.8.0/SDL2_image-2.8.0.tar.gz', 'https://github.com/libsdl-org/SDL_image/releases/download/release-2.8.0/SDL2_image-2.8.0.tar.gz',
'76ba035fd032c12987e4a0d39aa1f2e79989a51cea72f79d18ab084a24adc9cc') '76ba035fd032c12987e4a0d39aa1f2e79989a51cea72f79d18ab084a24adc9cc')
def configure(self, state: BuildState):
opts = state.options
opts['SDL2IMAGE_WEBP'] = 'YES'
opts['SDL2IMAGE_WEBP_SHARED'] = 'NO'
super().configure(state)
@staticmethod
def _process_pkg_config(pcfile: Path, line: str) -> str:
# Link with webpdemux library instead of webp
return line.replace('\n', 'demux\n') if line.startswith('Requires.private:') else line
class Sdl2MixerTarget(base.CMakeStaticDependencyTarget): class Sdl2MixerTarget(base.CMakeStaticDependencyTarget):
def __init__(self, name='sdl2_mixer'): def __init__(self, name='sdl2_mixer'):

View file

@ -5,9 +5,10 @@ includedir=${prefix}/include
Name: SDL2_image Name: SDL2_image
Description: image loading library for Simple DirectMedia Layer Description: image loading library for Simple DirectMedia Layer
Version: 2.6.3 Version: 2.8.0
Requires: sdl2 >= 2.0.9 Requires: sdl2 >= 2.0.9
Requires.private:
Libs: -L${libdir} -lSDL2_image Libs: -L${libdir} -lSDL2_image
Requires.private: libwebpdemux
Libs.private: Libs.private:
Cflags: -I${includedir} -I${includedir}/SDL2 Cflags: -I${includedir}/SDL2