Move PLUGINDIR to the make config.h

This commit is contained in:
Marek Roszko 2021-01-23 11:22:39 -05:00
parent d0aede5caf
commit 7b5397f81f
4 changed files with 5 additions and 4 deletions

View File

@ -1 +0,0 @@
#define PLUGINDIR "@CMAKE_INSTALL_FULL_LIBDIR@"

View File

@ -1,8 +1,6 @@
#add_definitions(-DPRINT_STATISTICS_3D_VIEWER)
add_definitions(-DPCBNEW)
configure_file( 3d_plugin_dir.h.in 3d_plugin_dir.h @ONLY )
include_directories(BEFORE ${INC_BEFORE})
include_directories(
${CMAKE_CURRENT_BINARY_DIR}

View File

@ -85,6 +85,9 @@
/// Allows scripts install directory to be referenced by the program code.
#define KICAD_DATA "@KICAD_DATA@"
// Plugins directory
#define KICAD_PLUGINDIR "@CMAKE_INSTALL_FULL_LIBDIR@"
/// ngspice version string detected by pkg-config when available.
#cmakedefine NGSPICE_BUILD_VERSION "@NGSPICE_BUILD_VERSION@"

View File

@ -24,6 +24,7 @@
#include <paths.h>
#include <pgm_base.h>
#include <settings/settings_manager.h>
#include <config.h>
wxString PATHS::GetUserPluginsPath()
@ -127,7 +128,7 @@ wxString PATHS::GetStockPluginsPath()
#else
// 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( PLUGINDIR );
wxString tfname = wxString::FromUTF8Unchecked( KICAD_PLUGINDIR );
fn.Assign( tfname, "" );
fn.AppendDir( "kicad" );
fn.AppendDir( wxT( "plugins" ) );