Update cmake & scons scripts to use new Collada includes for building with latest...
[blender.git] / source / blender / collada / CMakeLists.txt
1 # $Id: CMakeLists.txt 21789 2009-07-22 05:35:12Z kazanbas $
2 # ***** BEGIN GPL LICENSE BLOCK *****
3 #
4 # This program is free software; you can redistribute it and/or
5 # modify it under the terms of the GNU General Public License
6 # as published by the Free Software Foundation; either version 2
7 # of the License, or (at your option) any later version.
8 #
9 # This program is distributed in the hope that it will be useful,
10 # but WITHOUT ANY WARRANTY; without even the implied warranty of
11 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
12 # GNU General Public License for more details.
13 #
14 # You should have received a copy of the GNU General Public License
15 # along with this program; if not, write to the Free Software Foundation,
16 # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
17 #
18 # The Original Code is Copyright (C) 2006, Blender Foundation
19 # All rights reserved.
20 #
21 # The Original Code is: all of this file.
22 #
23 # Contributor(s): Jacques Beaurain.
24 #
25 # ***** END GPL LICENSE BLOCK *****
26
27 remove_strict_flags()
28
29 set(INC
30         .
31         ../blenlib
32         ../blenkernel
33         ../blenloader
34         ../windowmanager
35         ../makesdna
36         ../makesrna
37         ../editors/include
38         ../../../intern/guardedalloc
39 )
40
41 if(APPLE)
42         list(APPEND INC
43                 ${OPENCOLLADA_INC}/COLLADAStreamWriter
44                 ${OPENCOLLADA_INC}/COLLADABaseUtils
45                 ${OPENCOLLADA_INC}/COLLADAFramework
46                 ${OPENCOLLADA_INC}/COLLADASaxFrameworkLoader
47                 ${OPENCOLLADA_INC}/GeneratedSaxParser 
48         )
49 else()
50         list(APPEND INC
51                 ${OPENCOLLADA_INC}/COLLADAStreamWriter/include
52                 ${OPENCOLLADA_INC}/COLLADABaseUtils/include
53                 ${OPENCOLLADA_INC}/COLLADAFramework/include
54                 ${OPENCOLLADA_INC}/COLLADASaxFrameworkLoader/include 
55                 ${OPENCOLLADA_INC}/GeneratedSaxParser/include 
56         )
57 endif()
58
59 set(SRC
60         AnimationImporter.cpp
61         ArmatureExporter.cpp
62         ArmatureImporter.cpp
63         CameraExporter.cpp
64         DocumentExporter.cpp
65         DocumentImporter.cpp
66         EffectExporter.cpp
67         ExtraHandler.cpp
68         ExtraTags.cpp
69         GeometryExporter.cpp
70         ImageExporter.cpp
71         InstanceWriter.cpp
72         LightExporter.cpp
73         MaterialExporter.cpp
74         MeshImporter.cpp
75         SkinInfo.cpp
76         TransformReader.cpp
77         TransformWriter.cpp
78         collada.cpp
79         collada_internal.cpp
80         collada_utils.cpp
81
82         AnimationImporter.h
83         ArmatureExporter.h
84         ArmatureImporter.h
85         CameraExporter.h
86         DocumentExporter.h
87         DocumentImporter.h
88         EffectExporter.h
89         ExtraHandler.h
90         ExtraTags.h
91         GeometryExporter.h
92         ImageExporter.h
93         InstanceWriter.h
94         LightExporter.h
95         MaterialExporter.h
96         MeshImporter.h
97         SkinInfo.h
98         TransformReader.h
99         TransformWriter.h
100         collada.h
101         collada_internal.h
102         collada_utils.h
103 )
104
105 if(WITH_BUILDINFO)
106         add_definitions(-DNAN_BUILDINFO)
107 endif()
108
109 if(CMAKE_COMPILER_IS_GNUCXX)
110         # COLLADAFWArray.h gives error with gcc 4.5
111         set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fpermissive")
112 endif()
113
114 blender_add_lib(bf_collada "${SRC}" "${INC}")