Remove KICAD_PCM cmake option

This commit is contained in:
qu1ck 2022-01-02 10:14:15 -08:00 committed by Seth Hillbrand
parent 721403eb0e
commit 211820a689
10 changed files with 3 additions and 36 deletions

View File

@ -142,10 +142,6 @@ option( KICAD_GAL_PROFILE
"Enable profiling info for GAL" "Enable profiling info for GAL"
OFF ) OFF )
option( KICAD_PCM
"Build Plugin and Content Manager"
ON )
cmake_dependent_option( KICAD_WIN32_INSTALL_PDBS cmake_dependent_option( KICAD_WIN32_INSTALL_PDBS
"Installs debug pdb to the bin folder, DO NOT USE (NOR REQUIRED) FOR DEBUGGING THE SOURCE ON MSVC. This is purely for release building. "Installs debug pdb to the bin folder, DO NOT USE (NOR REQUIRED) FOR DEBUGGING THE SOURCE ON MSVC. This is purely for release building.
MSVC can find the PDBs without this." MSVC can find the PDBs without this."

View File

@ -5,20 +5,16 @@ if( COMPILER_SUPPORTS_WARNINGS )
endif() endif()
add_definitions( -DKICAD ) add_definitions( -DKICAD )
add_subdirectory( pcm )
include_directories( BEFORE ${INC_BEFORE} ) include_directories( BEFORE ${INC_BEFORE} )
include_directories( include_directories(
${CMAKE_SOURCE_DIR}/pcbnew ${CMAKE_SOURCE_DIR}/pcbnew
${CMAKE_SOURCE_DIR}/eeschema ${CMAKE_SOURCE_DIR}/eeschema
${CMAKE_SOURCE_DIR}/kicad/pcm
${INC_AFTER} ${INC_AFTER}
) )
if ( KICAD_PCM )
add_definitions( -DPCM )
add_subdirectory( pcm )
include_directories( ./pcm )
endif ( KICAD_PCM )
set( KICAD_SRCS set( KICAD_SRCS
dialogs/dialog_template_selector_base.cpp dialogs/dialog_template_selector_base.cpp
dialogs/dialog_template_selector.cpp dialogs/dialog_template_selector.cpp
@ -96,9 +92,7 @@ else()
) )
endif() endif()
if( KICAD_PCM ) target_link_libraries( kicad pcm )
target_link_libraries( kicad pcm )
endif()
install( TARGETS kicad install( TARGETS kicad
DESTINATION ${KICAD_BIN} DESTINATION ${KICAD_BIN}

View File

@ -144,11 +144,9 @@ void PANEL_KICAD_LAUNCHER::CreateLaunchers()
_( "Edit drawing sheet borders and title blocks for use in schematics and PCB " _( "Edit drawing sheet borders and title blocks for use in schematics and PCB "
"designs" ) ); "designs" ) );
#ifdef PCM
addLauncher( KICAD_MANAGER_ACTIONS::showPluginManager, addLauncher( KICAD_MANAGER_ACTIONS::showPluginManager,
KiScaledBitmap( BITMAPS::icon_pcm, this, 48, true ), KiScaledBitmap( BITMAPS::icon_pcm, this, 48, true ),
_( "Manage downloadable packages from KiCad and 3rd party repositories" ) ); _( "Manage downloadable packages from KiCad and 3rd party repositories" ) );
#endif
Layout(); Layout();
} }

View File

@ -97,10 +97,8 @@ BEGIN_EVENT_TABLE( KICAD_MANAGER_FRAME, EDA_BASE_FRAME )
END_EVENT_TABLE() END_EVENT_TABLE()
#ifdef PCM
// See below the purpose of this include // See below the purpose of this include
#include <wx/xml/xml.h> #include <wx/xml/xml.h>
#endif
KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title, KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& title,
const wxPoint& pos, const wxSize& size ) : const wxPoint& pos, const wxSize& size ) :
@ -114,13 +112,11 @@ KICAD_MANAGER_FRAME::KICAD_MANAGER_FRAME( wxWindow* parent, const wxString& titl
m_leftWinWidth = 250; // Default value m_leftWinWidth = 250; // Default value
m_aboutTitle = "KiCad"; m_aboutTitle = "KiCad";
#ifdef PCM
// JPC: A very ugly hack to fix an issue on Linux: if the wxbase315u_xml_gcc_custom.so is // JPC: A very ugly hack to fix an issue on Linux: if the wxbase315u_xml_gcc_custom.so is
// used **only** in PCM, it is not found in some cases at run time. // used **only** in PCM, it is not found in some cases at run time.
// So just use it in the main module to avoid a not found issue // So just use it in the main module to avoid a not found issue
// wxbase315u_xml_gcc_custom shared object when launching Kicad // wxbase315u_xml_gcc_custom shared object when launching Kicad
wxXmlDocument dummy; wxXmlDocument dummy;
#endif
// Create the status line (bottom of the frame). Left half is for project name; right half // Create the status line (bottom of the frame). Left half is for project name; right half
// is for Reporter (currently used by archiver/unarchiver). // is for Reporter (currently used by archiver/unarchiver).

View File

@ -35,7 +35,6 @@ KICAD_SETTINGS::KICAD_SETTINGS() :
m_params.emplace_back( m_params.emplace_back(
new PARAM_LIST<wxString>( "system.open_projects", &m_OpenProjects, {} ) ); new PARAM_LIST<wxString>( "system.open_projects", &m_OpenProjects, {} ) );
#ifdef PCM
m_params.emplace_back( new PARAM_LAMBDA<nlohmann::json>( m_params.emplace_back( new PARAM_LAMBDA<nlohmann::json>(
"pcm.repositories", "pcm.repositories",
[&]() -> nlohmann::json [&]() -> nlohmann::json
@ -76,7 +75,6 @@ KICAD_SETTINGS::KICAD_SETTINGS() :
m_params.emplace_back( m_params.emplace_back(
new PARAM<wxString>( "pcm.last_download_dir", &m_PcmLastDownloadDir, "" ) ); new PARAM<wxString>( "pcm.last_download_dir", &m_PcmLastDownloadDir, "" ) );
#endif
} }

View File

@ -37,10 +37,8 @@ public:
std::vector<wxString> m_OpenProjects; std::vector<wxString> m_OpenProjects;
#ifdef PCM
std::vector<std::pair<wxString, wxString>> m_PcmRepositories; std::vector<std::pair<wxString, wxString>> m_PcmRepositories;
wxString m_PcmLastDownloadDir; wxString m_PcmLastDownloadDir;
#endif
protected: protected:
virtual std::string getLegacyFrameName() const override { return "KicadFrame"; } virtual std::string getLegacyFrameName() const override { return "KicadFrame"; }

View File

@ -157,9 +157,7 @@ void KICAD_MANAGER_FRAME::ReCreateMenuBar()
toolsMenu->Add( KICAD_MANAGER_ACTIONS::convertImage ); toolsMenu->Add( KICAD_MANAGER_ACTIONS::convertImage );
toolsMenu->Add( KICAD_MANAGER_ACTIONS::showCalculator ); toolsMenu->Add( KICAD_MANAGER_ACTIONS::showCalculator );
toolsMenu->Add( KICAD_MANAGER_ACTIONS::editDrawingSheet ); toolsMenu->Add( KICAD_MANAGER_ACTIONS::editDrawingSheet );
#ifdef PCM
toolsMenu->Add( KICAD_MANAGER_ACTIONS::showPluginManager ); toolsMenu->Add( KICAD_MANAGER_ACTIONS::showPluginManager );
#endif
toolsMenu->AppendSeparator(); toolsMenu->AppendSeparator();
toolsMenu->Add( _( "Edit Local File..." ), toolsMenu->Add( _( "Edit Local File..." ),

View File

@ -110,13 +110,11 @@ TOOL_ACTION KICAD_MANAGER_ACTIONS::editDrawingSheet( "kicad.Control.editDrawingS
_( "Drawing Sheet Editor" ), _( "Edit drawing sheet borders and title block" ), _( "Drawing Sheet Editor" ), _( "Edit drawing sheet borders and title block" ),
BITMAPS::icon_pagelayout_editor_24 ); BITMAPS::icon_pagelayout_editor_24 );
#ifdef PCM
TOOL_ACTION KICAD_MANAGER_ACTIONS::showPluginManager( "kicad.Control.pluginContentManager", TOOL_ACTION KICAD_MANAGER_ACTIONS::showPluginManager( "kicad.Control.pluginContentManager",
AS_GLOBAL, AS_GLOBAL,
MD_CTRL + 'M', "", MD_CTRL + 'M', "",
_( "Plugin and Content Manager" ), _( "Run Plugin and Content Manager" ), _( "Plugin and Content Manager" ), _( "Run Plugin and Content Manager" ),
BITMAPS::icon_pcm_24 ); BITMAPS::icon_pcm_24 );
#endif
TOOL_ACTION KICAD_MANAGER_ACTIONS::openTextEditor( "kicad.Control.openTextEditor", TOOL_ACTION KICAD_MANAGER_ACTIONS::openTextEditor( "kicad.Control.openTextEditor",
AS_GLOBAL, AS_GLOBAL,

View File

@ -46,9 +46,7 @@ public:
static TOOL_ACTION showCalculator; static TOOL_ACTION showCalculator;
static TOOL_ACTION editDrawingSheet; static TOOL_ACTION editDrawingSheet;
static TOOL_ACTION openTextEditor; static TOOL_ACTION openTextEditor;
#ifdef PCM
static TOOL_ACTION showPluginManager; static TOOL_ACTION showPluginManager;
#endif
static TOOL_ACTION editOtherSch; static TOOL_ACTION editOtherSch;
static TOOL_ACTION editOtherPCB; static TOOL_ACTION editOtherPCB;

View File

@ -37,10 +37,7 @@
#include <wx/checkbox.h> #include <wx/checkbox.h>
#include <wx/dir.h> #include <wx/dir.h>
#include <wx/filedlg.h> #include <wx/filedlg.h>
#ifdef PCM
#include "dialog_pcm.h" #include "dialog_pcm.h"
#endif
///> Helper widget to select whether a new directory should be created for a project. ///> Helper widget to select whether a new directory should be created for a project.
@ -819,7 +816,6 @@ int KICAD_MANAGER_CONTROL::Execute( const TOOL_EVENT& aEvent )
int KICAD_MANAGER_CONTROL::ShowPluginManager( const TOOL_EVENT& aEvent ) int KICAD_MANAGER_CONTROL::ShowPluginManager( const TOOL_EVENT& aEvent )
{ {
#ifdef PCM
DIALOG_PCM pcm( m_frame ); DIALOG_PCM pcm( m_frame );
pcm.ShowModal(); pcm.ShowModal();
@ -827,7 +823,6 @@ int KICAD_MANAGER_CONTROL::ShowPluginManager( const TOOL_EVENT& aEvent )
// PCM keeps the focus althougt the focus was not set to this button. // PCM keeps the focus althougt the focus was not set to this button.
// This hack force removing the focus from this button // This hack force removing the focus from this button
m_frame->SetFocus(); m_frame->SetFocus();
#endif
return 0; return 0;
} }
@ -858,7 +853,5 @@ void KICAD_MANAGER_CONTROL::setTransitions()
Go( &KICAD_MANAGER_CONTROL::Execute, KICAD_MANAGER_ACTIONS::editOtherSch.MakeEvent() ); Go( &KICAD_MANAGER_CONTROL::Execute, KICAD_MANAGER_ACTIONS::editOtherSch.MakeEvent() );
Go( &KICAD_MANAGER_CONTROL::Execute, KICAD_MANAGER_ACTIONS::editOtherPCB.MakeEvent() ); Go( &KICAD_MANAGER_CONTROL::Execute, KICAD_MANAGER_ACTIONS::editOtherPCB.MakeEvent() );
#ifdef PCM
Go( &KICAD_MANAGER_CONTROL::ShowPluginManager, KICAD_MANAGER_ACTIONS::showPluginManager.MakeEvent() ); Go( &KICAD_MANAGER_CONTROL::ShowPluginManager, KICAD_MANAGER_ACTIONS::showPluginManager.MakeEvent() );
#endif
} }