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: =?UTF-8?q?Stefan=20L=C3=B6ffler?= <st.loeffler@gmail.com>
Date: Sat, 26 Jun 2021 19:49:25 +0200
Subject: [PATCH 1/2] Fix static builds


diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1111111..2222222 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -88,7 +88,7 @@ option(BUILD_SHARED_LIBS "Build poppler as a shared library" ON)
 option(RUN_GPERF_IF_PRESENT "Run gperf if it is found" ON)
 option(INSTALL_GLIB_DEMO "Whether to install the poppler-glib-demo program." OFF)
 if(WIN32)
-  option(ENABLE_RELOCATABLE "Do not hardcode the poppler library location (on Windows)." ON)
+  option(ENABLE_RELOCATABLE "Do not hardcode the poppler library location (on Windows)." ${BUILD_SHARED_LIBS})
 else()
   set(ENABLE_RELOCATABLE OFF)
 endif()

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: "fix@me" <fix@me>
Date: Fri, 5 May 2023 18:00:00 +0200
Subject: [PATCH 2/2] Fix static builds involving qtimageformats


diff --git a/CMakeLists.txt b/CMakeLists.txt
index 1111111..2222222 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -220,7 +220,7 @@ find_soft_mandatory_package(ENABLE_QT5 Qt5Widgets ${QT5_VERSION})
 find_soft_mandatory_package(ENABLE_QT5 Qt5Test ${QT5_VERSION})
 
 set(QT6_VERSION "6.2")
-SET(QT_NO_CREATE_VERSIONLESS_TARGETS ON)
+SET(QT_NO_CREATE_VERSIONLESS_TARGETS ${BUILD_SHARED_LIBS})
 find_soft_mandatory_package(ENABLE_QT6 Qt6Core ${QT6_VERSION})
 find_soft_mandatory_package(ENABLE_QT6 Qt6Gui ${QT6_VERSION})
 find_soft_mandatory_package(ENABLE_QT6 Qt6Widgets ${QT6_VERSION})
