2016-09-27 19:01:08 +00:00
|
|
|
/* Distributed under the OSI-approved BSD 3-Clause License. See accompanying
|
|
|
|
file Copyright.txt or https://cmake.org/licensing for details. */
|
2013-11-16 14:41:32 +00:00
|
|
|
#ifndef cmExtraKateGenerator_h
|
|
|
|
#define cmExtraKateGenerator_h
|
|
|
|
|
2017-08-25 18:39:02 +00:00
|
|
|
#include "cmConfigure.h" // IWYU pragma: keep
|
2016-09-01 18:59:28 +00:00
|
|
|
|
2013-11-16 14:41:32 +00:00
|
|
|
#include "cmExternalMakefileProjectGenerator.h"
|
|
|
|
|
2016-09-01 18:59:28 +00:00
|
|
|
#include <string>
|
|
|
|
|
2013-11-16 14:41:32 +00:00
|
|
|
class cmGeneratedFileStream;
|
2016-09-01 18:59:28 +00:00
|
|
|
class cmLocalGenerator;
|
2013-11-16 14:41:32 +00:00
|
|
|
|
|
|
|
/** \class cmExtraKateGenerator
|
|
|
|
* \brief Write Kate project files for Makefile or ninja based projects
|
|
|
|
*/
|
|
|
|
class cmExtraKateGenerator : public cmExternalMakefileProjectGenerator
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmExtraKateGenerator();
|
|
|
|
|
2016-07-20 16:28:39 +00:00
|
|
|
static cmExternalMakefileProjectGeneratorFactory* GetFactory();
|
2013-11-16 14:41:32 +00:00
|
|
|
|
2017-09-15 13:56:26 +00:00
|
|
|
void Generate() override;
|
2016-05-16 14:34:04 +00:00
|
|
|
|
2013-11-16 14:41:32 +00:00
|
|
|
private:
|
2015-10-06 22:49:19 +00:00
|
|
|
void CreateKateProjectFile(const cmLocalGenerator* lg) const;
|
|
|
|
void CreateDummyKateProjectFile(const cmLocalGenerator* lg) const;
|
|
|
|
void WriteTargets(const cmLocalGenerator* lg,
|
|
|
|
cmGeneratedFileStream& fout) const;
|
2016-05-16 14:34:04 +00:00
|
|
|
void AppendTarget(cmGeneratedFileStream& fout, const std::string& target,
|
|
|
|
const std::string& make, const std::string& makeArgs,
|
|
|
|
const std::string& path, const char* homeOutputDir) const;
|
2013-05-20 15:28:00 +00:00
|
|
|
|
2015-10-06 22:49:19 +00:00
|
|
|
std::string GenerateFilesString(const cmLocalGenerator* lg) const;
|
2013-11-16 14:41:32 +00: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;
|
2013-12-10 21:52:15 +00:00
|
|
|
bool UseNinja;
|
2013-11-16 14:41:32 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|