2009-01-18 23:48:25 +00:00
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# ASSIMP scons build file
|
|
|
|
#
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
import sys
|
|
|
|
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
g_LibPath = Split("""
|
|
|
|
./
|
|
|
|
/usr/lib/
|
|
|
|
/usr/local/lib/
|
|
|
|
""")
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
g_IncPath = Split("""
|
|
|
|
../../code/
|
|
|
|
/usr/include/
|
|
|
|
/usr/local/include/
|
|
|
|
""")
|
|
|
|
#------------------------------------------------------------------------------
|
2009-12-14 17:17:41 +00:00
|
|
|
g_assimp_lib_Source = Glob(r"../../code/*.cpp") + Glob(r"../../contrib/irrXML/*.cpp") + Glob(r"../../contrib/zlib/*.c") + Glob(r"../../code/extra/*.cpp") + Glob(r"../../contrib/ConvertUTF/*.c")
|
2009-01-18 23:48:25 +00:00
|
|
|
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
# don't reset CC/CXX-variable, other users might have set it to something special
|
|
|
|
#------------------------------------------------------------------------------
|
|
|
|
ccflags = '-pipe'
|
|
|
|
|
|
|
|
if ARGUMENTS.get('debug', 0):
|
|
|
|
print "Using Debug Build!"
|
|
|
|
ccflags = ccflags + ' -g -pg -Wall -pedantic '
|
|
|
|
else:
|
|
|
|
ccflags = ccflags + ' -Os -fno-strict-aliasing -msse -Wall -pedantic'
|
2009-12-14 17:17:41 +00:00
|
|
|
|
2009-12-14 18:32:06 +00:00
|
|
|
if ARGUMENTS.get('noboost', 0):
|
|
|
|
ccflags = ccflags + ' -DASSIMP_BUILD_BOOST_WORKAROUND '
|
2009-01-18 23:48:25 +00:00
|
|
|
|
|
|
|
env = Environment(CCFLAGS = ccflags, CPPPATH = g_IncPath, LIBPATH=g_LibPath)
|
|
|
|
conf = Configure( env )
|
|
|
|
|
|
|
|
#if not conf.CheckCHeader( "boost/thread/thread.hpp" ):
|
|
|
|
# print "Boost must be installed!"
|
|
|
|
# Exit( 1 )
|
|
|
|
env = conf.Finish()
|
|
|
|
|
|
|
|
# Build library
|
2009-12-14 18:32:06 +00:00
|
|
|
|
|
|
|
if ARGUMENTS.get("shared",0):
|
|
|
|
env.SharedLibrary(target = "assimp", source = g_assimp_lib_Source,
|
|
|
|
LIBPATH = g_LibPath)
|
|
|
|
|
|
|
|
else:
|
|
|
|
env.StaticLibrary(target = "assimp", source = g_assimp_lib_Source,
|
2009-01-18 23:48:25 +00:00
|
|
|
LIBPATH = g_LibPath)
|
|
|
|
|