cmake/Source/cmExtraKateGenerator.h

45 lines
1.5 KiB
C
Raw Normal View History

2016-10-30 18:24:19 +01:00
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
file Copyright.txt or https://cmake.org/licensing for details. */
2021-09-14 00:13:48 +02:00
#pragma once
2014-08-03 19:52:23 +02:00
2018-01-26 17:06:56 +01:00
#include "cmConfigure.h" // IWYU pragma: keep
2016-10-30 18:24:19 +01:00
#include <string>
2020-02-01 23:06:01 +01:00
#include "cmExternalMakefileProjectGenerator.h"
2014-08-03 19:52:23 +02:00
class cmGeneratedFileStream;
2016-10-30 18:24:19 +01:00
class cmLocalGenerator;
2014-08-03 19:52:23 +02:00
/** \class cmExtraKateGenerator
* \brief Write Kate project files for Makefile or ninja based projects
*/
class cmExtraKateGenerator : public cmExternalMakefileProjectGenerator
{
public:
cmExtraKateGenerator();
2016-10-30 18:24:19 +01:00
static cmExternalMakefileProjectGeneratorFactory* GetFactory();
2018-01-26 17:06:56 +01:00
void Generate() override;
2016-07-09 11:21:54 +02:00
2014-08-03 19:52:23 +02:00
private:
2020-08-30 11:54:41 +02:00
void CreateKateProjectFile(const cmLocalGenerator& lg) const;
void CreateDummyKateProjectFile(const cmLocalGenerator& lg) const;
void WriteTargets(const cmLocalGenerator& lg,
2016-03-13 13:35:51 +01:00
cmGeneratedFileStream& fout) const;
2016-07-09 11:21:54 +02:00
void AppendTarget(cmGeneratedFileStream& fout, const std::string& target,
const std::string& make, const std::string& makeArgs,
2018-04-23 21:13:27 +02:00
const std::string& path,
const std::string& homeOutputDir) const;
2014-08-03 19:52:23 +02:00
2020-08-30 11:54:41 +02:00
std::string GenerateFilesString(const cmLocalGenerator& lg) const;
2014-08-03 19:52:23 +02:00
std::string GetPathBasename(const std::string& path) const;
std::string GenerateProjectName(const std::string& name,
const std::string& type,
const std::string& path) const;
std::string ProjectName;
bool UseNinja;
};