Cleanup: sort cmake file lists
[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 FIND_FILE(OPENCOLLADA_ANIMATION_CLIP
28       NAMES
29         COLLADAFWAnimationClip.h
30       PATHS
31         ${OPENCOLLADA_INCLUDE_DIRS}
32       NO_DEFAULT_PATH
33     )
34
35 IF(OPENCOLLADA_ANIMATION_CLIP)
36    message(STATUS "Found opencollada: ${OPENCOLLADA_ANIMATION_CLIP} ")
37    add_definitions(-DWITH_OPENCOLLADA_ANIMATION_CLIP)
38 ELSE()
39    message(STATUS "opencollada: Build without animation clip support")
40 ENDIF()
41
42 set(INC
43         .
44         ../blenkernel
45         ../blenlib
46         ../blentranslation
47         ../editors/include
48         ../makesdna
49         ../makesrna
50         ../windowmanager
51         ../imbuf
52         ../../../intern/guardedalloc
53         ../ikplugin
54         ../../../intern/iksolver/extern
55         ../bmesh
56 )
57
58 set(INC_SYS
59         ${OPENCOLLADA_INCLUDE_DIRS}
60 )
61
62 set(SRC
63         AnimationExporter.cpp
64         AnimationImporter.cpp
65         ArmatureExporter.cpp
66         ArmatureImporter.cpp
67         CameraExporter.cpp
68         ControllerExporter.cpp
69         DocumentExporter.cpp
70         DocumentImporter.cpp
71         EffectExporter.cpp
72         ErrorHandler.cpp
73         ExportSettings.cpp
74         ExtraHandler.cpp
75         ExtraTags.cpp
76         GeometryExporter.cpp
77         ImageExporter.cpp
78         ImportSettings.cpp
79         InstanceWriter.cpp
80         LightExporter.cpp
81         MaterialExporter.cpp
82         MeshImporter.cpp
83         SceneExporter.cpp
84         SkinInfo.cpp
85         TransformReader.cpp
86         TransformWriter.cpp
87         collada.cpp
88         collada_internal.cpp
89         collada_utils.cpp
90
91         AnimationExporter.h
92         AnimationImporter.h
93         ArmatureExporter.h
94         ArmatureImporter.h
95         CameraExporter.h
96         ControllerExporter.h
97         DocumentExporter.h
98         DocumentImporter.h
99         EffectExporter.h
100         ErrorHandler.h
101         ExportSettings.h
102         ExtraHandler.h
103         ExtraTags.h
104         GeometryExporter.h
105         ImageExporter.h
106         ImportSettings.h
107         InstanceWriter.h
108         LightExporter.h
109         MaterialExporter.h
110         MeshImporter.h
111         SceneExporter.h
112         SkinInfo.h
113         TransformReader.h
114         TransformWriter.h
115         collada.h
116         collada_internal.h
117         collada_utils.h
118 )
119
120 if(WITH_BUILDINFO)
121         add_definitions(-DWITH_BUILDINFO)
122 endif()
123
124 if(WITH_INTERNATIONAL)
125         add_definitions(-DWITH_INTERNATIONAL)
126 endif()
127
128 if(CMAKE_COMPILER_IS_GNUCXX)
129         # COLLADAFWArray.h gives error with gcc 4.5
130         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
131 endif()
132
133 blender_add_lib(bf_collada "${SRC}" "${INC}" "${INC_SYS}")