SDL_image: cmake: If we're using a vendored libjxl, link it as C++

From 509daac32880daf2e7ac732767f9d55de5902e11 Mon Sep 17 00:00:00 2001
From: Simon McVittie <[EMAIL REDACTED]>
Date: Mon, 23 May 2022 20:55:46 +0100
Subject: [PATCH] cmake: If we're using a vendored libjxl, link it as C++

Otherwise we'll fail to link with missing libstdc++ symbols.

Thanks: Anonymous Maarten
Signed-off-by: Simon McVittie <smcv@collabora.com>
---
 CMakeLists.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index e6f10fc..6d24b10 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -400,6 +400,7 @@ endif()
 if(SDL2IMAGE_JXL)
     target_compile_definitions(SDL2_image PRIVATE LOAD_JXL)
     if(SDL2IMAGE_JXL_VENDORED)
+        enable_language(CXX)
         message(STATUS "${PROJECT_NAME}: Using vendored libjxl")
         set(BUILD_TESTING OFF)
         # JPEGXL_ENABLE_MANPAGES variable is used by libjxl