2016-09-27 22:01:08 +03: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 18:41:32 +04:00
|
|
|
#ifndef cmExtraKateGenerator_h
|
|
|
|
#define cmExtraKateGenerator_h
|
|
|
|
|
2016-09-01 21:59:28 +03:00
|
|
|
#include <cmConfigure.h>
|
|
|
|
|
2013-11-16 18:41:32 +04:00
|
|
|
#include "cmExternalMakefileProjectGenerator.h"
|
|
|
|
|
2016-09-01 21:59:28 +03:00
|
|
|
#include <string>
|
|
|
|
|
2013-11-16 18:41:32 +04:00
|
|
|
class cmGeneratedFileStream;
|
2016-09-01 21:59:28 +03:00
|
|
|
class cmLocalGenerator;
|
2013-11-16 18:41:32 +04:00
|
|
|
|
|
|
|
/** \class cmExtraKateGenerator
|
|
|
|
* \brief Write Kate project files for Makefile or ninja based projects
|
|
|
|
*/
|
|
|
|
class cmExtraKateGenerator : public cmExternalMakefileProjectGenerator
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
cmExtraKateGenerator();
|
|
|
|
|
2016-07-20 19:28:39 +03:00
|
|
|
static cmExternalMakefileProjectGeneratorFactory* GetFactory();
|
2013-11-16 18:41:32 +04:00
|
|
|
|
2016-06-27 22:25:27 +03:00
|
|
|
void Generate() CM_OVERRIDE;
|
2016-05-16 17:34:04 +03:00
|
|
|
|
2013-11-16 18:41:32 +04:00
|
|
|
private:
|
2015-10-07 01:49:19 +03:00
|
|
|
void CreateKateProjectFile(const cmLocalGenerator* lg) const;
|
|
|
|
void CreateDummyKateProjectFile(const cmLocalGenerator* lg) const;
|
|
|
|
void WriteTargets(const cmLocalGenerator* lg,
|
|
|
|
cmGeneratedFileStream& fout) const;
|
2016-05-16 17:34:04 +03: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 19:28:00 +04:00
|
|
|
|
2015-10-07 01:49:19 +03:00
|
|
|
std::string GenerateFilesString(const cmLocalGenerator* lg) const;
|
2013-11-16 18:41:32 +04: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-11 01:52:15 +04:00
|
|
|
bool UseNinja;
|
2013-11-16 18:41:32 +04:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|