diff --git a/3d-viewer/3d_plugin_dir.h.in b/3d-viewer/3d_plugin_dir.h.in deleted file mode 100644 index fb923ec05c..0000000000 --- a/3d-viewer/3d_plugin_dir.h.in +++ /dev/null @@ -1 +0,0 @@ -#define PLUGINDIR "@CMAKE_INSTALL_FULL_LIBDIR@" diff --git a/3d-viewer/CMakeLists.txt b/3d-viewer/CMakeLists.txt index c709321c50..7ec25f4cc1 100644 --- a/3d-viewer/CMakeLists.txt +++ b/3d-viewer/CMakeLists.txt @@ -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} diff --git a/CMakeModules/config.h.cmake b/CMakeModules/config.h.cmake index 9ec74d7266..3281570885 100644 --- a/CMakeModules/config.h.cmake +++ b/CMakeModules/config.h.cmake @@ -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@" diff --git a/common/paths.cpp b/common/paths.cpp index 39bfc177e4..678e15932e 100644 --- a/common/paths.cpp +++ b/common/paths.cpp @@ -24,6 +24,7 @@ #include #include #include +#include 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" ) );