diff --git a/SConstruct b/SConstruct index 301d7391..45e48478 100644 --- a/SConstruct +++ b/SConstruct @@ -34,8 +34,6 @@ build('src/librender/SConscript') build('src/libhw/SConscript') # Bidirectional support library build('src/libbidir/SConscript') -# Python binding library -build('src/mtspy/SConscript') # ===== Build the applications ===== env = env.Clone() @@ -49,9 +47,13 @@ converter_objects = build('src/converter/SConscript', ['mainEnv']) # Build the Qt-based GUI binaries build('src/mtsgui/SConscript', ['mainEnv', 'converter_objects'], duplicate=True) +env['SHLIBPREFIX']='' + +# Python binding library +build('src/mtspy/SConscript') + # ===== Build the plugins ===== -env['SHLIBPREFIX']='' Export('env') # Utilities diff --git a/src/mtspy/SConscript b/src/mtspy/SConscript index 67c6d3f4..94318bfe 100644 --- a/src/mtspy/SConscript +++ b/src/mtspy/SConscript @@ -1,14 +1,17 @@ -Import('env', 'sys', 'os') +Import('env', 'sys', 'os', 'hasPython') pythonEnv = env.Clone() pythonEnv.Append(CPPDEFINES = [['MTS_BUILD_MODULE', 'MTS_MODULE_PYTHON']]) +pythonEnv['SHLIBPREFIX']='' + if sys.platform == 'darwin': pythonEnv.Append(CXXFLAGS = ['-framework', 'Python'], CPPPATH=['/System/Library/Frameworks/Python.framework/Versions/2.5/Headers'], LIBS=['boost_python', 'boost_system', 'Python']) -mtspy = pythonEnv.SharedLibrary('mtspy', ['base.cpp']); +if hasPython: + mtspy = pythonEnv.SharedLibrary('mtspy', ['base.cpp']); -if sys.platform == "darwin": - pythonEnv.AddPostAction(mtspy, 'install_name_tool -id @executable_path/../Frameworks/mtspy.dylib $TARGET') + if sys.platform == "darwin": + pythonEnv.AddPostAction(mtspy, 'install_name_tool -id @executable_path/../Frameworks/mtspy.dylib $TARGET')