Skip to content
Snippets Groups Projects
Commit e1ff09a1 authored by Amorilia's avatar Amorilia
Browse files

Added SCons support for building niflib.

parent 7671c98e
No related branches found
No related tags found
No related merge requests found
import sys
import os
from distutils import sysconfig
if sys.platform == 'linux2' or sys.platform == 'linux-i386':
python_lib = ['python%d.%d' % sys.version_info[0:2]]
python_libpath = [sysconfig.get_python_lib (0, 1) + '/config']
python_include = [sysconfig.get_python_inc ()]
cppflags = ''
elif sys.platform == 'win32':
python_include = [sysconfig.get_python_inc()]
python_libpath = [sysconfig.get_python_lib(1, 1) + '/../libs']
python_lib = ['python24']
cppflags = '/EHsc'
else:
print "platform %s not supported"%sys.platform
env = Environment(ENV = os.environ)
env.StaticLibrary('niflib', Split('niflib.cpp nif_math.cpp NIF_Blocks.cpp NIF_IO.cpp docsys_extract.cpp'), CPPPATH = '.', CPPFLAGS = cppflags)
env.SharedLibrary('_niflib', 'pyniflib.i', LIBS=['niflib'] + python_lib, LIBPATH=['.'] + python_libpath, SWIGFLAGS = '-c++ -python', CPPPATH = ['.'] + python_include, CPPFLAGS = cppflags)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment