fix T58568 build errors when using collada 1.6.68 or newer
[blender.git] / source / blender / collada / CMakeLists.txt
1 # ***** BEGIN GPL LICENSE BLOCK *****
2 #
3 # This program is free software; you can redistribute it and/or
4 # modify it under the terms of the GNU General Public License
5 # as published by the Free Software Foundation; either version 2
6 # of the License, or (at your option) any later version.
7 #
8 # This program is distributed in the hope that it will be useful,
9 # but WITHOUT ANY WARRANTY; without even the implied warranty of
10 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11 # GNU General Public License for more details.
12 #
13 # You should have received a copy of the GNU General Public License
14 # along with this program; if not, write to the Free Software Foundation,
15 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
16 #
17 # The Original Code is Copyright (C) 2006, Blender Foundation
18 # All rights reserved.
19 #
20 # The Original Code is: all of this file.
21 #
22 # Contributor(s): Jacques Beaurain.
23 #
24 # ***** END GPL LICENSE BLOCK *****
25
26 remove_strict_flags()
27
28 FIND_FILE(_opencollada_with_animation_clip
29       NAMES
30         COLLADAFWAnimationClip.h
31       PATHS
32         ${OPENCOLLADA_INCLUDE_DIRS}
33       NO_DEFAULT_PATH
34     )
35
36 IF(_opencollada_with_animation_clip)
37    add_compile_definitions(OPENCOLLADA_WITH_ANIMATION_CLIP)
38 ENDIF()
39
40 set(INC
41         .
42         ../blenkernel
43         ../blenlib
44         ../blentranslation
45         ../editors/include
46         ../makesdna
47         ../makesrna
48         ../windowmanager
49         ../imbuf
50         ../../../intern/guardedalloc
51         ../ikplugin
52         ../../../intern/iksolver/extern
53         ../bmesh
54 )
55
56 set(INC_SYS
57         ${OPENCOLLADA_INCLUDE_DIRS}
58 )
59
60 set(SRC
61         AnimationImporter.cpp
62         AnimationExporter.cpp
63         ArmatureExporter.cpp
64         ArmatureImporter.cpp
65         CameraExporter.cpp
66         ControllerExporter.cpp
67         DocumentExporter.cpp
68         DocumentImporter.cpp
69         EffectExporter.cpp
70         ErrorHandler.cpp
71         ExportSettings.cpp
72         ImportSettings.cpp
73         ExtraHandler.cpp
74         ExtraTags.cpp
75         GeometryExporter.cpp
76         ImageExporter.cpp
77         InstanceWriter.cpp
78         LightExporter.cpp
79         MaterialExporter.cpp
80         MeshImporter.cpp
81         SkinInfo.cpp
82         SceneExporter.cpp
83         TransformReader.cpp
84         TransformWriter.cpp
85         collada.cpp
86         collada_internal.cpp
87         collada_utils.cpp
88
89         AnimationImporter.h
90         AnimationExporter.h
91         ArmatureExporter.h
92         ArmatureImporter.h
93         CameraExporter.h
94         ControllerExporter.h
95         DocumentExporter.h
96         DocumentImporter.h
97         EffectExporter.h
98         ErrorHandler.h
99         ExportSettings.h
100         ImportSettings.h
101         ExtraHandler.h
102         ExtraTags.h
103         GeometryExporter.h
104         ImageExporter.h
105         InstanceWriter.h
106         LightExporter.h
107         MaterialExporter.h
108         MeshImporter.h
109         SkinInfo.h
110         SceneExporter.h
111         TransformReader.h
112         TransformWriter.h
113         collada.h
114         collada_internal.h
115         collada_utils.h
116 )
117
118 if(WITH_BUILDINFO)
119         add_definitions(-DWITH_BUILDINFO)
120 endif()
121
122 if(WITH_INTERNATIONAL)
123         add_definitions(-DWITH_INTERNATIONAL)
124 endif()
125
126 if(CMAKE_COMPILER_IS_GNUCXX)
127         # COLLADAFWArray.h gives error with gcc 4.5
128         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
129 endif()
130
131 blender_add_lib(bf_collada "${SRC}" "${INC}" "${INC_SYS}")