-
Notifications
You must be signed in to change notification settings - Fork 0
/
devil-1-fixes.patch
109 lines (90 loc) · 4.19 KB
/
devil-1-fixes.patch
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
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 <[email protected]>
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 <[email protected]>
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 <[email protected]>
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)