Move mikktspace code to own library, so it is clear that it is also
authorNathan Letwory <nathan@letworyinteractive.com>
Tue, 15 Feb 2011 09:24:35 +0000 (09:24 +0000)
committerNathan Letwory <nathan@letworyinteractive.com>
Tue, 15 Feb 2011 09:24:35 +0000 (09:24 +0000)
intended as a standalone library for use in other applications that
want the same tangent space as Blender.

This also keeps blenkernel clean(er) from extra math functions.

intern/CMakeLists.txt
intern/SConscript
intern/mikktspace/CMakeLists.txt [new file with mode: 0644]
intern/mikktspace/SConscript [new file with mode: 0644]
intern/mikktspace/mikktspace.c [moved from source/blender/blenkernel/intern/mikktspace.c with 100% similarity]
intern/mikktspace/mikktspace.h [moved from source/blender/blenkernel/mikktspace.h with 100% similarity]
source/blender/blenkernel/CMakeLists.txt
source/blender/blenkernel/SConscript
source/blender/render/CMakeLists.txt
source/blender/render/SConscript

index 3eed1ef54d2dafef14da766602b0c0eba27e0d0f..33bf9bb476c00be323e1c4f3bd1b772f7db6efec 100644 (file)
@@ -33,6 +33,7 @@ add_subdirectory(memutil)
 add_subdirectory(iksolver)
 add_subdirectory(opennl)
 add_subdirectory(smoke)
+add_subdirectory(mikktspace)
 
 if(WITH_MOD_FLUID)
        add_subdirectory(elbeem)
index 241662b708888baa4d65a720eea6e139406bc47e..9a78f8ddace4a25e60700c84bc75e900cfa7f113 100644 (file)
@@ -13,6 +13,7 @@ SConscript(['audaspace/SConscript',
             'itasc/SConscript',
             'boolop/SConscript',
             'opennl/SConscript',
+            'mikktspace/SConscript',
             'smoke/SConscript'])
 
 # NEW_CSG was intended for intern/csg, but
diff --git a/intern/mikktspace/CMakeLists.txt b/intern/mikktspace/CMakeLists.txt
new file mode 100644 (file)
index 0000000..0be0f71
--- /dev/null
@@ -0,0 +1,36 @@
+# $Id$
+# ***** BEGIN GPL LICENSE BLOCK *****
+#
+# This program is free software; you can redistribute it and/or
+# modify it under the terms of the GNU General Public License
+# as published by the Free Software Foundation; either version 2
+# of the License, or (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+#
+# The Original Code is Copyright (C) 2006, Blender Foundation
+# All rights reserved.
+#
+# The Original Code is: all of this file.
+#
+# Contributor(s): Daniel Genrich
+#
+# ***** END GPL LICENSE BLOCK *****
+
+set(INC
+       .
+)
+
+set(SRC
+       mikktspace.c
+)
+
+blender_add_lib(bf_intern_mikktspace "${SRC}" "${INC}")
+
diff --git a/intern/mikktspace/SConscript b/intern/mikktspace/SConscript
new file mode 100644 (file)
index 0000000..8f31f21
--- /dev/null
@@ -0,0 +1,9 @@
+#!/usr/bin/python
+Import ('env')
+
+sources = ['mikktspace.c']
+
+incs = ''
+defs = ''
+
+env.BlenderLib ('bf_intern_mikktspace', sources, Split(incs), Split(defs), libtype=['intern'], priority=[100] )
index ae72423445976b929b641f57b5b659fedab1bbe9..c8969f8677866835f50533c69633dc799d41bc38 100644 (file)
@@ -48,6 +48,7 @@ set(INC
        ../../../intern/memutil
        ../../../intern/opennl/extern
        ../../../intern/smoke/extern
+       ../../../intern/mikktspace
     ../../../source/blender/windowmanager # XXX - BAD LEVEL CALL WM_api.h
        ${ZLIB_INCLUDE_DIRS}
 )
@@ -106,7 +107,6 @@ set(SRC
        intern/mball.c
        intern/mesh.c
        intern/mesh_validate.c
-       intern/mikktspace.c
        intern/modifier.c
        intern/multires.c
        intern/nla.c
@@ -223,7 +223,6 @@ set(SRC
        BKE_writeffmpeg.h
        BKE_writeframeserver.h
        depsgraph_private.h
-       mikktspace.h
        intern/CCGSubSurf.h
        intern/bmesh_private.h
        nla_private.h
index 21afb882d92dd8b85bc15dab4f6ba363a1e65583..bef72d3bf67234cf6678fa8c1a5bf5995fe7bb92 100644 (file)
@@ -12,6 +12,7 @@ incs += ' #/extern/bullet2/src'
 incs += ' #/intern/opennl/extern #/intern/bsp/extern'
 incs += ' ../gpu #/extern/glew/include'
 incs += ' #/intern/smoke/extern'
+incs += ' #/intern/mikktspace'
 incs += ' #/intern/audaspace/intern'
 
 incs += ' ' + env['BF_OPENGL_INC']
index 4a3a73e74672488d9eb727e9c31959cda3bba702..f00e54c1796cbbf8c7a8c6be708af9d9b7fa369c 100644 (file)
@@ -38,6 +38,7 @@ set(INC
        ../imbuf
        ../../kernel/gen_messaging
        ../../../intern/smoke/extern
+       ../../../intern/mikktspace
        ../../../intern/guardedalloc
 )
 
index bce24fe38a166329dd318a33445f52be0506531a..a402139b9271aab3bc4b88665da2bc475a63ffc7 100644 (file)
@@ -6,7 +6,7 @@ raysources = env.Glob('intern/raytrace/*.cpp')
 
 incs = 'intern/include #/intern/guardedalloc ../blenlib ../makesdna ../makesrna'
 incs += ' extern/include ../blenkernel ../radiosity/extern/include ../imbuf'
-incs += ' ../include ../blenloader ../../../intern/smoke/extern'
+incs += ' ../include ../blenloader ../../../intern/smoke/extern ../../../intern/mikktspace'
 
 cflags_raytrace = env['CCFLAGS']
 cxxflags_raytrace = env['CXXFLAGS']