From be8275749d06a7b59ef6d151e845406b76880217 Mon Sep 17 00:00:00 2001 From: Wenzel Jakob Date: Wed, 27 Nov 2013 15:32:48 +0100 Subject: [PATCH] some linker flag fixes --- src/libpython/SConscript | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/libpython/SConscript b/src/libpython/SConscript index 6f10c492..5fa95577 100644 --- a/src/libpython/SConscript +++ b/src/libpython/SConscript @@ -32,6 +32,10 @@ for ver in hasPython: if sys.platform == 'darwin': pythonEnv.Append(LINKFLAGS=['-Xlinker', '-rpath', '-Xlinker', '@loader_path/../../Contents/Frameworks', '-undefined', 'dynamic_lookup']) + elif 'linux' in sys.platform: + # Linux: ensure that all core Mitsuba libraries are loaded when the plugin is used in Python + pythonEnv.Append(SHLINKFLAGS=['-Wl,-R,\'$$ORIGIN/../..\'']) + pythonEnv.Append(SHLINKFLAGS=['-Wl,-no-as-needed', '-lmitsuba-hw', '-Wl,-no-as-needed', '-lmitsuba-bidir']) libcore_obj = pythonEnv.SharedObject('core_'+ver, 'core.cpp') librender_obj = pythonEnv.SharedObject('render_'+ver, 'render.cpp')