From e3a06dca704e234fc3ae9958df7417b3b3c463f4 Mon Sep 17 00:00:00 2001 From: Maciej Suminski Date: Thu, 19 Apr 2018 14:48:31 +0200 Subject: [PATCH] Fallback to system ngspice library when libngspice is not found in other paths on macOS --- eeschema/sim/ngspice.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/eeschema/sim/ngspice.cpp b/eeschema/sim/ngspice.cpp index 048260be50..f85d075ae5 100644 --- a/eeschema/sim/ngspice.cpp +++ b/eeschema/sim/ngspice.cpp @@ -313,9 +313,10 @@ void NGSPICE::init_dll() break; } } -#else /* not __WINDOWS || __WXMAC__ */ - m_dll.Load( wxDynamicLibrary::CanonicalizeName( "ngspice" ) ); -#endif + + if( !m_dll.IsLoaded() ) // try also the system libraries +#endif /* __WINDOWS || __WXMAC__ */ + m_dll.Load( wxDynamicLibrary::CanonicalizeName( "ngspice" ) ); if( !m_dll.IsLoaded() ) throw std::runtime_error( "Missing ngspice shared library" );