assimp/workspaces/SCons/SConstruct

54 lines
1.8 KiB
Python
Raw Normal View History

#------------------------------------------------------------------------------
# ASSIMP scons build file
#
#------------------------------------------------------------------------------
import sys
#------------------------------------------------------------------------------
g_LibPath = Split("""
./
/usr/lib/
/usr/local/lib/
""")
#------------------------------------------------------------------------------
g_IncPath = Split("""
../../code/
/usr/include/
/usr/local/include/
""")
#------------------------------------------------------------------------------
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")
#------------------------------------------------------------------------------
# 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'
if ARGUMENTS.get('noboost', 0):
ccflags = ccflags + ' -DASSIMP_BUILD_BOOST_WORKAROUND '
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
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,
LIBPATH = g_LibPath)