This file is part of MXE. See LICENSE.md for licensing information.

Contains ad hoc patches for cross building.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Sun, 13 Feb 2022 17:30:59 +0100
Subject: [PATCH 1/2] try to fix linking to libtiff's transitive dependencies


diff --git a/src/imageformats/configure.cmake b/src/imageformats/configure.cmake
index 1111111..2222222 100644
--- a/src/imageformats/configure.cmake
+++ b/src/imageformats/configure.cmake
@@ -19,6 +19,8 @@ set_property(CACHE INPUT_webp PROPERTY STRINGS undefined no qt system)
 
 qt_find_package(WrapJasper PROVIDED_TARGETS WrapJasper::WrapJasper MODULE_NAME imageformats QMAKE_LIB jasper)
 qt_find_package(TIFF PROVIDED_TARGETS TIFF::TIFF MODULE_NAME imageformats QMAKE_LIB tiff)
+### <sigh>
+target_link_libraries(TIFF::TIFF INTERFACE -ltiff -lwebp -lsharpyuv -lzstd -llzma -ljpeg -lz)
 # Threads::Threads might be brought in via a top-level CMakeLists.txt find_package dependency
 # in which case if the system WebpConfig.cmake depends Threads, it shouldn't try to promote it to
 # global to avoid a 'global promotion of a target in a different subdirectory' error.

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Mark Brand <mabrand@mabrand.nl>
Date: Thu, 6 Apr 2023 17:27:28 +0200
Subject: [PATCH 2/2] explicit -lsharpyuv for -lwebp


diff --git a/cmake/FindWrapWebP.cmake b/cmake/FindWrapWebP.cmake
index 1111111..2222222 100644
--- a/cmake/FindWrapWebP.cmake
+++ b/cmake/FindWrapWebP.cmake
@@ -51,7 +51,7 @@ mark_as_advanced(WebP_INCLUDE_DIR WebP_LIBRARY WebP_demux_INCLUDE_DIR WebP_demux
 if(WrapWebP_FOUND)
     set(WebP_FOUND ON)
     add_library(WrapWebP::WrapWebP INTERFACE IMPORTED)
-    target_link_libraries(WrapWebP::WrapWebP INTERFACE ${WebP_LIBRARY} ${WebP_demux_LIBRARY} ${WebP_mux_LIBRARY})
+    target_link_libraries(WrapWebP::WrapWebP INTERFACE ${WebP_LIBRARY} ${WebP_demux_LIBRARY} ${WebP_mux_LIBRARY} -lsharpyuv)
     target_include_directories(WrapWebP::WrapWebP
                                INTERFACE ${WebP_INCLUDE_DIR} ${WebP_demux_INCLUDE_DIR} ${WebP_mux_INCLUDE_DIR})
 endif()
