-
Notifications
You must be signed in to change notification settings - Fork 31
/
Copy pathdevil-issue-95.patch
37 lines (33 loc) · 1.37 KB
/
devil-issue-95.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
diff --git a/DevIL/src-ILU/CMakeLists.txt b/DevIL/src-ILU/CMakeLists.txt
index 17a3afe7..1ab264d9 100644
--- a/DevIL/src-ILU/CMakeLists.txt
+++ b/DevIL/src-ILU/CMakeLists.txt
@@ -42,9 +42,11 @@ 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})
-
+if(BUILD_SHARED_LIBS)
+ add_library(ILU SHARED ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC})
+else(BUILD_SHARED_LIBS)
+ add_library(ILU ${ILU_SRCS} ${ILU_INC} ${ILU_RSRC})
+endif(BUILD_SHARED_LIBS)
## ILU requires IL
target_link_libraries(ILU
diff --git a/DevIL/src-ILUT/CMakeLists.txt b/DevIL/src-ILUT/CMakeLists.txt
index 21470cbc..6a1126ef 100644
--- a/DevIL/src-ILUT/CMakeLists.txt
+++ b/DevIL/src-ILUT/CMakeLists.txt
@@ -42,8 +42,11 @@ 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})
+if(BUILD_SHARED_LIBS)
+ add_library(ILUT SHARED ${ILUT_SRCS} ${ILUT_INC} ${ILUT_RSRC})
+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