From 4e85c7639641b50d76844827a38421a79698ee3b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Villemot?= <sebastien@dynare.org> Date: Tue, 1 Apr 2025 14:44:48 +0200 Subject: [PATCH] Build system: with Octave 10, MEX files must now be linked with liboctmex (cherry picked from commit e3ff2f108862b462bfb8f5b92bcebaaf6f8a6aa9) --- meson.build | 6 +++++- windows/deps/mkoctfile64 | 2 ++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/meson.build b/meson.build index fa955125c1..a062ca70f1 100644 --- a/meson.build +++ b/meson.build @@ -198,7 +198,11 @@ else # Octave build octave_incflags = run_command(mkoctfile_exe, '-p', 'INCFLAGS', check : true).stdout().split() octlibdir = run_command(mkoctfile_exe, '-p', 'OCTLIBDIR', check : true).stdout().strip() - octave_libs = run_command(mkoctfile_exe, '-p', 'OCTAVE_LIBS', check : true).stdout().split() + if octave_version.version_compare('<10') + octave_libs = run_command(mkoctfile_exe, '-p', 'OCTAVE_LIBS', check : true).stdout().split() + else + octave_libs = run_command(mkoctfile_exe, '-p', 'LIBOCTMEX', check : true).stdout().split() + endif octave_link_args = [] diff --git a/windows/deps/mkoctfile64 b/windows/deps/mkoctfile64 index e1e8440bdf..a1bb1931a9 100755 --- a/windows/deps/mkoctfile64 +++ b/windows/deps/mkoctfile64 @@ -105,6 +105,8 @@ fi : ${OCTAVE_LIBS="$LIBOCTINTERP $LIBOCTAVE $SPECIAL_MATH_LIB"} +: ${LIBOCTMEX="-loctmex"} + # Local variables. FFTW_LIBS="$FFTW3_LDFLAGS $FFTW3_LIBS $FFTW3F_LDFLAGS $FFTW3F_LIBS" -- GitLab