diff --git a/src/plugins/cmakeprojectmanager/cmakekitaspect.cpp b/src/plugins/cmakeprojectmanager/cmakekitaspect.cpp index c49ad1ae3c3..00750f4d3c5 100644 --- a/src/plugins/cmakeprojectmanager/cmakekitaspect.cpp +++ b/src/plugins/cmakeprojectmanager/cmakekitaspect.cpp @@ -1279,7 +1279,7 @@ KitAspect *CMakeConfigurationKitAspect::createKitAspect(Kit *k) return cmakeConfigurationKitAspectFactory().createKitAspect(k); } -void CMakeKitAspect::createFactories() +void Internal::setupCMakeKitAspects() { cmakeKitAspectFactory(); cmakeGeneratorKitAspectFactory(); diff --git a/src/plugins/cmakeprojectmanager/cmakekitaspect.h b/src/plugins/cmakeprojectmanager/cmakekitaspect.h index b85bb7bad31..cf734d19576 100644 --- a/src/plugins/cmakeprojectmanager/cmakekitaspect.h +++ b/src/plugins/cmakeprojectmanager/cmakekitaspect.h @@ -27,7 +27,6 @@ public: private: friend class CMakeToolManager; - static void createFactories(); }; class CMAKE_EXPORT CMakeGeneratorKitAspect @@ -70,4 +69,6 @@ public: static ProjectExplorer::KitAspect *createKitAspect(ProjectExplorer::Kit *k); }; +namespace Internal { void setupCMakeKitAspects(); } + } // CMakeProjectManager diff --git a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp index d9b840a7729..9c2a23dc061 100644 --- a/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp +++ b/src/plugins/cmakeprojectmanager/cmakeprojectplugin.cpp @@ -8,6 +8,7 @@ #include "cmakeformatter.h" #include "cmakeinstallstep.h" #include "cmakelocatorfilter.h" +#include "cmakekitaspect.h" #include "cmakeparser.h" #include "cmakeproject.h" #include "cmakeprojectconstants.h" @@ -53,6 +54,7 @@ class CMakeProjectPlugin final : public ExtensionSystem::IPlugin setupCMakeToolManager(this); setupCMakeSettingsPage(); + setupCMakeKitAspects(); setupCMakeBuildConfiguration(); setupCMakeBuildStep(); diff --git a/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp b/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp index b6caf2a7f4e..cf63ce791f5 100644 --- a/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp +++ b/src/plugins/cmakeprojectmanager/cmaketoolmanager.cpp @@ -18,13 +18,15 @@ #include #include #include -#include + #include #include #include #include +#include + using namespace Core; using namespace Utils; @@ -186,8 +188,6 @@ CMakeToolManager::CMakeToolManager() setObjectName("CMakeToolManager"); ExtensionSystem::PluginManager::addObject(this); - - CMakeKitAspect::createFactories(); } CMakeToolManager::~CMakeToolManager()