3d stock plugins (dll plugins): fix incorrect path on Linux.

Fixes #7750
https://gitlab.com/kicad/code/kicad/issues/7750
This commit is contained in:
jean-pierre charras 2021-03-01 21:02:47 +01:00
parent 959ae73a01
commit 35e6e55bc9
1 changed files with 11 additions and 1 deletions

View File

@ -172,7 +172,7 @@ wxString PATHS::GetStockPluginsPath()
#elif defined( __WXMSW__ )
fn.Assign( Pgm().GetExecutablePath() + wxT( "/plugins/" ) );
#else
// PLUGINDIR = CMAKE_INSTALL_FULL_LIBDIR path is the absolute path
// KICAD_DATA is the absolute path
// corresponding to the install path used for constructing KICAD_USER_PLUGIN
wxString tfname = wxString::FromUTF8Unchecked( KICAD_DATA );
fn.Assign( tfname, "" );
@ -187,7 +187,17 @@ wxString PATHS::GetStockPlugins3DPath()
{
wxFileName fn;
#ifdef __UNIX__
// KICAD_PLUGINDIR = CMAKE_INSTALL_FULL_LIBDIR path is the absolute path
// corresponding to the install path used for constructing KICAD_USER_PLUGIN
wxString tfname = wxString::FromUTF8Unchecked( KICAD_PLUGINDIR );
fn.Assign( tfname, "" );
fn.AppendDir( wxT( "kicad" ) );
fn.AppendDir( wxT( "plugins" ) );
#else
fn.Assign( PATHS::GetStockPluginsPath() );
#endif
fn.AppendDir( "3d" );
return fn.GetPathWithSep();