From 3b95c00d96fb73d201f64ec0ab8f527c1f859ee8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kacper=20Michaj=C5=82ow?= Date: Thu, 3 Oct 2024 17:16:41 +0200 Subject: [PATCH] ci/win32: add libjxl For JPEG XL support. --- ci/build-win32.ps1 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/ci/build-win32.ps1 b/ci/build-win32.ps1 index 6fd2f9b696..ed00e82b9d 100644 --- a/ci/build-win32.ps1 +++ b/ci/build-win32.ps1 @@ -111,6 +111,23 @@ vulkan_dep = vulkan_proj.dependency('vulkan') meson.override_dependency('vulkan', vulkan_dep) "@ +# Manually wrap libjxl for CMAKE_MSVC_RUNTIME_LIBRARY option +if (-not (Test-Path "$subprojects/libjxl")) { + New-Item -Path "$subprojects/libjxl" -ItemType Directory | Out-Null +} +Set-Content -Path "$subprojects/libjxl/meson.build" -Value @" +project('libjxl', 'cpp', version: '0.12.0') +cmake = import('cmake') +opts = cmake.subproject_options() +opts.add_cmake_defines({ + 'CMAKE_MSVC_RUNTIME_LIBRARY': 'MultiThreaded', + 'BUILD_SHARED_LIBS': 'OFF', +}) +libjxl_proj = cmake.subproject('libjxl-cmake', options: opts) +libjxl_dep = libjxl_proj.dependency('jxl') +meson.override_dependency('libjxl', libjxl_dep) +"@ + $projects = @( @{ Path = "$subprojects/ffmpeg.wrap" @@ -155,6 +172,11 @@ $projects = @( URL = "https://github.com/KhronosGroup/Vulkan-Loader" Revision = "main" Method = "cmake" + }, + @{ + Path = "$subprojects/libjxl-cmake.wrap" + URL = "https://github.com/libjxl/libjxl" + Revision = "main" } ) @@ -188,6 +210,7 @@ meson setup build ` -Dffmpeg:sdl2=disabled ` -Dffmpeg:vulkan=auto ` -Dffmpeg:libdav1d=enabled ` + -Dffmpeg:libjxl=enabled ` -Dlcms2:fastfloat=true ` -Dlcms2:jpeg=disabled ` -Dlcms2:tiff=disabled `