mirror of
https://gitlab.com/kicad/code/kicad.git
synced 2025-04-21 00:21:25 +00:00
Enable qa_ngspice to run from build dir on macOS
This commit is contained in:
parent
9b1b318736
commit
1198233464
eeschema
@ -20,10 +20,12 @@ set( INC_AFTER ${INC_AFTER} ${NGSPICE_INCLUDE_DIR} )
|
||||
# Find out the exact libngspice file name
|
||||
get_filename_component( NGSPICE_DLL_ABSPATH "${NGSPICE_DLL}" ABSOLUTE )
|
||||
get_filename_component( NGSPICE_DLL_FILE "${NGSPICE_DLL_ABSPATH}" NAME )
|
||||
get_filename_component( NGSPICE_DLL_DIR "${NGSPICE_DLL_ABSPATH}" DIRECTORY )
|
||||
|
||||
set_property( SOURCE sim/ngspice.cpp
|
||||
APPEND PROPERTY COMPILE_DEFINITIONS
|
||||
NGSPICE_DLL_FILE="${NGSPICE_DLL_FILE}"
|
||||
NGSPICE_DLL_DIR="${NGSPICE_DLL_DIR}"
|
||||
)
|
||||
|
||||
include_directories( BEFORE ${INC_BEFORE} )
|
||||
|
@ -436,12 +436,12 @@ void NGSPICE::init_dll()
|
||||
wxFileName dllFile( "", NGSPICE_DLL_FILE );
|
||||
#if defined(__WINDOWS__)
|
||||
#if defined( _MSC_VER )
|
||||
const std::vector<std::string> dllPaths = { "" };
|
||||
std::vector<std::string> dllPaths = { "" };
|
||||
#else
|
||||
const std::vector<std::string> dllPaths = { "", "/mingw64/bin", "/mingw32/bin" };
|
||||
std::vector<std::string> dllPaths = { "", "/mingw64/bin", "/mingw32/bin" };
|
||||
#endif
|
||||
#elif defined(__WXMAC__)
|
||||
const std::vector<std::string> dllPaths = {
|
||||
std::vector<std::string> dllPaths = {
|
||||
PATHS::GetOSXKicadUserDataDir().ToStdString() + "/PlugIns/ngspice",
|
||||
PATHS::GetOSXKicadMachineDataDir().ToStdString() + "/PlugIns/ngspice",
|
||||
|
||||
@ -453,9 +453,12 @@ void NGSPICE::init_dll()
|
||||
"/../../../../../Contents/PlugIns/sim"
|
||||
};
|
||||
#else // Unix systems
|
||||
const std::vector<std::string> dllPaths = { "/usr/local/lib" };
|
||||
std::vector<std::string> dllPaths = { "/usr/local/lib" };
|
||||
#endif
|
||||
|
||||
if( wxGetEnv( wxT( "KICAD_RUN_FROM_BUILD_DIR" ), nullptr ) )
|
||||
dllPaths.emplace_back( NGSPICE_DLL_DIR );
|
||||
|
||||
#if defined(__WINDOWS__) || (__WXMAC__)
|
||||
for( const auto& path : dllPaths )
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user