Skip to content

Commit

Permalink
Merge pull request SyneRBI#366 from rijobro/linux_matlab_fix
Browse files Browse the repository at this point in the history
Add to LD_LIBRARY_PATH for MatlabEngine.so etc
  • Loading branch information
KrisThielemans authored Jan 4, 2021
2 parents f4b8f14 + 8cf3573 commit 6886a37
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
4 changes: 4 additions & 0 deletions SuperBuild.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,10 @@ set(SyneRBI_INSTALL ${SUPERBUILD_INSTALL_DIR})
## in the env_ccppetmr scripts we perform a substitution of the whole block
## during the configure_file() command call below.

if (BUILD_SPM AND NOT DISABLE_MATLAB AND Matlab_ROOT_DIR AND "${CMAKE_SYSTEM}" MATCHES "Linux")
set(Matlab_extra_ld_path ":${Matlab_ROOT_DIR}/extern/bin/glnxa64")
endif()

set(ENV_PYTHON_BASH "##### Python not found #####")
set(ENV_PYTHON_CSH "##### Python not found #####")
if(PYTHONINTERP_FOUND)
Expand Down
4 changes: 2 additions & 2 deletions env_ccppetmr.csh.in
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,9 @@ setenv SIRF_INSTALL_PATH @SyneRBI_INSTALL@
# Where to find shared libraries
# Setting for Linux but doesn't harm elsewhere
if $?LD_LIBRARY_PATH then
setenv LD_LIBRARY_PATH @SyneRBI_INSTALL@/lib:$LD_LIBRARY_PATH
setenv LD_LIBRARY_PATH @SyneRBI_INSTALL@/lib:$LD_LIBRARY_PATH@Matlab_extra_ld_path@
else
setenv LD_LIBRARY_PATH @SyneRBI_INSTALL@/lib
setenv LD_LIBRARY_PATH @SyneRBI_INSTALL@/lib@Matlab_extra_ld_path@
endif
# Setting for MacOS but doesn't harm elsewhere
if $?DYLD_FALLBACK_LIBRARY_PATH then
Expand Down
2 changes: 1 addition & 1 deletion env_ccppetmr.sh.in
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SIRF_INSTALL_PATH=@SyneRBI_INSTALL@
export SIRF_INSTALL_PATH
# Where to find shared libraries
# Setting for Linux but doesn't harm elsewhere
LD_LIBRARY_PATH=@SyneRBI_INSTALL@/lib:$LD_LIBRARY_PATH
LD_LIBRARY_PATH=@SyneRBI_INSTALL@/lib:$LD_LIBRARY_PATH@Matlab_extra_ld_path@
export LD_LIBRARY_PATH
# Setting for MacOS but doesn't harm elsewhere
DYLD_FALLBACK_LIBRARY_PATH=@SyneRBI_INSTALL@/lib:$DYLD_FALLBACK_LIBRARY_PATH
Expand Down

0 comments on commit 6886a37

Please sign in to comment.