vcpkg icon indicating copy to clipboard operation
vcpkg copied to clipboard

Can't get SDL_image to support JPEG

Open auselen opened this issue 6 years ago • 4 comments

Installed libjpeg-turbo, still didn't get it.

Made USE_JPEG to ON by default

set(USE_JPEG ON) <-- on by default
message("FEATURES: ${FEATURES}") <-- print features
if("libjpeg-turbo" IN_LIST FEATURES)
    set(USE_JPEG ON)
endif()

then got it working. This was the output btw

-- Using source at C:/gits/vcpkg/buildtrees/sdl2-image/src/2.0.5-633f4ae965
FEATURES: core
-- Configuring x86-windows

So how does the FEATURES list work?

auselen avatar Jan 12 '20 23:01 auselen

Features is a very simple thing. You need specify comma separated list inside square brackets vcpkg install sdl2-image[libjpeg-turbo] or vcpkg install sdl2-image[libjpeg-turbo,libwebp] By default it setted to core. So you need to reinstall sdl2-image with libjpeg-turbo feature

Yeah, it's not documented well

crackedmind avatar Jan 13 '20 20:01 crackedmind

It worked thanks.

auselen avatar Jan 14 '20 19:01 auselen

I cannot run these commands in Ubuntu 18.04.4 LTS with vcpkg version 2020.02.04-unknownhash However when I search for sdl2-image, I can see the sdl2-image[libjpeg-turbo]. Only way to use it changing portfile.cmake

./vcpkg search sdl2-image[libjpeg-turbo]
zsh: no matches found: sdl2-image[libjpeg-turbo]
./vcpkg install sdl2-image[libjpeg-turbo]                                                                                                                                 
zsh: no matches found: sdl2-image[libjpeg-turbo]

erdinckaya avatar May 20 '20 19:05 erdinckaya

I cannot run these commands in Ubuntu 18.04.4 LTS with vcpkg version 2020.02.04-unknownhash However when I search for sdl2-image, I can see the sdl2-image[libjpeg-turbo]. Only way to use it changing portfile.cmake

./vcpkg search sdl2-image[libjpeg-turbo]
zsh: no matches found: sdl2-image[libjpeg-turbo]
./vcpkg install sdl2-image[libjpeg-turbo]                                                                                                                                 
zsh: no matches found: sdl2-image[libjpeg-turbo]

Always quote the names of packages with features on macOS or Linux like this, vcpkg install 'sdl2-image[libjpeg-turbo]'. Square brackets are part of Z shell's syntax. For example:

arr=(0 1 2);
echo $arr[1]
# Output 0

kogiokka avatar Nov 10 '21 07:11 kogiokka