OSDN Git Service

brushlib splitoff (moved some code from lib into brushlib)
[mypaint-anime/master.git] / lib / SConscript
1 Import('env')
2 import sys
3
4 # For the record: I know that scons supports swig. But it doesn't scan for #include in the generated code.
5
6 # I have given up. Scons just can't get the dependencies right with those
7 # code generators. Let's give scons a "normal" c++ project to dependency-scan.
8 env.Execute('swig -o mypaintlib_wrap.cpp -python -c++ mypaintlib.i')
9 env.Clean('.', 'mypaintlib_wrap.cc')
10 env.Clean('.', 'mypaintlib.py')
11
12 # python extension module
13 src = 'mypaintlib_wrap.cpp'
14 if sys.platform == "win32": # there 's a better way to do this 
15         module = env.LoadableModule('_mypaintlib', Split(src), SHLIBPREFIX="", SHLIBSUFFIX=".pyd")
16 else:
17         module = env.LoadableModule('_mypaintlib', Split(src), SHLIBPREFIX="")
18
19
20 # installation
21
22 #env.Install(module, '$PREFIX/lib/mypaint') # location for private compiled extensions
23 ##env.Install(module, '$PREFIX/share/mypaint') # theoretical location for private pure python modules (meld uses $PREFIX/lib/meld)
24 #env.Install(data, '$PREFIX/share/mypaint')