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: Christian Weigel <christian.weigel@idmt.fraunhofer.de>
Date: Fri, 17 Feb 2017 10:07:48 +0100
Subject: [PATCH 1/3] fix static build of ilu and ilut

taken from https://github.com/DentonW/DevIL/pull/59

diff --git a/DevIL/src-ILU/CMakeLists.txt b/DevIL/src-ILU/CMakeLists.txt
index 1111111..2222222 100644
--- a/DevIL/src-ILU/CMakeLists.txt
+++ b/DevIL/src-ILU/CMakeLists.txt
@@ -42,9 +42,13 @@ source_group("Source Files" FILES src/*.cpp)
 source_group("Header Files" FILES ${ILU_INC} )
 source_group("Resource Files" FILES ${ILU_RSRC} )
 
-# Remove SHARED to create a static library
-add_library(ILU SHARED ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC})
-set_target_properties(ILU PROPERTIES SOVERSION 1)
+if(BUILD_SHARED_LIBS)
+    add_library(ILU SHARED ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC})
+    set_target_properties(ILU PROPERTIES SOVERSION 1)
+else(BUILD_SHARED_LIBS)
+    add_library(ILU ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC})
+endif(BUILD_SHARED_LIBS)
+
 
 
 ## ILU requires IL
diff --git a/DevIL/src-ILUT/CMakeLists.txt b/DevIL/src-ILUT/CMakeLists.txt
index 1111111..2222222 100644
--- a/DevIL/src-ILUT/CMakeLists.txt
+++ b/DevIL/src-ILUT/CMakeLists.txt
@@ -62,9 +62,13 @@ source_group("Source Files" FILES src/*.cpp)
 source_group("Header Files" FILES ${ILUT_INC} )
 source_group("Resource Files" FILES ${ILUT_RSRC} )
 
-# Remove SHARED to create a static library
-add_library(ILUT SHARED ${ILUT_SRCS} ${ILUT_INC} ${ILUT_RSRC})
-set_target_properties(ILUT PROPERTIES SOVERSION 1)
+if(BUILD_SHARED_LIBS)
+    add_library(ILUT SHARED ${ILUT_SRCS} ${ILUT_INC} ${ILUT_RSRC})
+    set_target_properties(ILUT PROPERTIES SOVERSION 1)
+else(BUILD_SHARED_LIBS)
+    add_library(ILUT ${ILUT_SRCS} ${ILUT_INC} ${ILUT_RSRC})
+endif(BUILD_SHARED_LIBS)
+
 
 ## add link sub library info
 target_link_libraries(ILUT

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Tony Theodore <tonyt@logyst.com>
Date: Thu, 20 Jul 2017 16:34:51 +1000
Subject: [PATCH 2/3] fix resource paths

DevIL/src-IL/msvc/IL.rc has weird EOL issues and patches don't
apply - use $(SED) in build rule instead

diff --git a/DevIL/src-ILU/msvc/ILU.rc b/DevIL/src-ILU/msvc/ILU.rc
index 1111111..2222222 100644
--- a/DevIL/src-ILU/msvc/ILU.rc
+++ b/DevIL/src-ILU/msvc/ILU.rc
@@ -101,7 +101,7 @@ END
 
 // Icon with lowest ID value placed first to ensure application icon
 // remains consistent on all systems.
-IDI_ICON1               ICON                    "resources\\IL Logo.ico"
+IDI_ICON1               ICON                    "./resources/IL Logo.ico"
 
 /////////////////////////////////////////////////////////////////////////////
 //
diff --git a/DevIL/src-ILUT/msvc/ILUT.rc b/DevIL/src-ILUT/msvc/ILUT.rc
index 1111111..2222222 100644
--- a/DevIL/src-ILUT/msvc/ILUT.rc
+++ b/DevIL/src-ILUT/msvc/ILUT.rc
@@ -101,7 +101,7 @@ END
 
 // Icon with lowest ID value placed first to ensure application icon
 // remains consistent on all systems.
-IDI_ICON1               ICON                    "resources\\IL Logo.ico"
+IDI_ICON1               ICON                    "./resources/IL Logo.ico"
 
 /////////////////////////////////////////////////////////////////////////////
 //

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Eshed <ashdnazg@gmail.com>
Date: Sun, 21 Jan 2018 22:07:18 +0200
Subject: [PATCH 3/3] Fix case

See: https://github.com/DentonW/DevIL/pull/71

diff --git a/DevIL/src-IL/CMakeLists.txt b/DevIL/src-IL/CMakeLists.txt
index 1111111..2222222 100644
--- a/DevIL/src-IL/CMakeLists.txt
+++ b/DevIL/src-IL/CMakeLists.txt
@@ -41,7 +41,7 @@ if(WIN32)
 		else(UNICODE)
 			set(DevIL_RSRC ${DevIL_RSRC} "msvc/resources/IL Logo.ico" "msvc/IL.rc")
 		endif(UNICODE)
-        set(DevIL_TXT ${DevIL_TXT} ../AUTHORS ../ChangeLog ../CREDITS ../libraries.txt ../README.md ../README.cmake ../TODO)
+        set(DevIL_TXT ${DevIL_TXT} ../AUTHORS ../ChangeLog ../CREDITS ../Libraries.txt ../README.md ../README.cmake ../TODO)
 #		SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} /NODEFAULTLIB:msvcrt.lib ")
 		set(CMAKE_C_FLAGS_RELEASE "/MT /O2")
 	else(BUILD_SHARED_LIBS)
