Merge branch 'master' into blender2.8
[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         ../depsgraph
46         ../editors/include
47         ../makesdna
48         ../makesrna
49         ../windowmanager
50         ../imbuf
51         ../../../intern/guardedalloc
52         ../ikplugin
53         ../../../intern/iksolver/extern
54         ../bmesh
55 )
56
57 set(INC_SYS
58         ${OPENCOLLADA_INCLUDE_DIRS}
59 )
60
61 set(SRC
62         AnimationImporter.cpp
63         AnimationExporter.cpp
64         AnimationClipExporter.cpp
65         ArmatureExporter.cpp
66         ArmatureImporter.cpp
67         BlenderContext.cpp
68         BCAnimationCurve.cpp
69         BCAnimationSampler.cpp
70         BCSampleData.cpp
71         CameraExporter.cpp
72         ControllerExporter.cpp
73         DocumentExporter.cpp
74         DocumentImporter.cpp
75         EffectExporter.cpp
76         ErrorHandler.cpp
77         ExportSettings.cpp
78         ImportSettings.cpp
79         ExtraHandler.cpp
80         ExtraTags.cpp
81         GeometryExporter.cpp
82         ImageExporter.cpp
83         InstanceWriter.cpp
84         LightExporter.cpp
85         MaterialExporter.cpp
86         MeshImporter.cpp
87         SkinInfo.cpp
88         Materials.cpp
89         SceneExporter.cpp
90         TransformReader.cpp
91         TransformWriter.cpp
92         collada.cpp
93         collada_internal.cpp
94         collada_utils.cpp
95
96         AnimationImporter.h
97         AnimationExporter.h
98         AnimationClipExporter.h
99         ArmatureExporter.h
100         ArmatureImporter.h
101         BlenderContext.h
102         BCAnimationCurve.h
103         BCAnimationSampler.h
104         BCSampleData.h
105         CameraExporter.h
106         ControllerExporter.h
107         DocumentExporter.h
108         DocumentImporter.h
109         EffectExporter.h
110         ErrorHandler.h
111         ExportSettings.h
112         ImportSettings.h
113         ExtraHandler.h
114         ExtraTags.h
115         GeometryExporter.h
116         ImageExporter.h
117         InstanceWriter.h
118         LightExporter.h
119         MaterialExporter.h
120         MeshImporter.h
121         Materials.h
122         SkinInfo.h
123         SceneExporter.h
124         TransformReader.h
125         TransformWriter.h
126         collada.h
127         collada_internal.h
128         collada_utils.h
129 )
130
131 if(WITH_BUILDINFO)
132         add_definitions(-DWITH_BUILDINFO)
133 endif()
134
135 if(WITH_INTERNATIONAL)
136         add_definitions(-DWITH_INTERNATIONAL)
137 endif()
138
139 if(CMAKE_COMPILER_IS_GNUCXX)
140         # COLLADAFWArray.h gives error with gcc 4.5
141         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
142 endif()
143
144 blender_add_lib(bf_collada "${SRC}" "${INC}" "${INC_SYS}")