SDL_image: cmake: With vendored libjxl, only link libjxl_dec statically

From 7cd341f472f09ce08baa4256be5b69e36720546f Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Mon, 23 May 2022 19:04:04 +0100
Subject: [PATCH] cmake: With vendored libjxl, only link libjxl_dec statically

We only have a libjxl decoder, so we don't need the encoder half of the
library, or its dependencies. This fixes a vendored build on Linux,
which otherwise fails to configure because there is no vendored liblcms.

Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 CMakeLists.txt | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 34116d3..e6f10fc 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -423,8 +423,8 @@ if(SDL2IMAGE_JXL)
                 )
             endif()
         else()
-            set(jxl_lib jxl-static)
-            list(APPEND INSTALL_EXTRA_TARGETS brotlidec-static brotlicommon-static brotlienc-static hwy ${jxl_lib})
+            set(jxl_lib jxl_dec-static)
+            list(APPEND INSTALL_EXTRA_TARGETS brotlidec-static brotlicommon-static hwy ${jxl_lib})
         endif()
         if(NOT TARGET libjxl::libjxl)
             add_library(libjxl::libjxl ALIAS ${jxl_lib})