kate: support also the build plugin in kate <= 4.12
With this patch, simply also the information used by the build plugin in kate <= 4.12 is put into the generated json file. The new build plugin (coming in 4.13) simply ignores this (and vice versa). Alex
This commit is contained in:
parent
8bd6cf0f33
commit
424d5dc078
|
@ -86,17 +86,28 @@ void
|
||||||
cmExtraKateGenerator::WriteTargets(const cmMakefile* mf,
|
cmExtraKateGenerator::WriteTargets(const cmMakefile* mf,
|
||||||
cmGeneratedFileStream& fout) const
|
cmGeneratedFileStream& fout) const
|
||||||
{
|
{
|
||||||
|
const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
|
||||||
|
const std::string makeArgs = mf->GetSafeDefinition(
|
||||||
|
"CMAKE_KATE_MAKE_ARGUMENTS");
|
||||||
|
const char* homeOutputDir = mf->GetHomeOutputDirectory();
|
||||||
|
|
||||||
fout <<
|
fout <<
|
||||||
"\t\"build\": {\n"
|
"\t\"build\": {\n"
|
||||||
"\t\t\"directory\": \"" << mf->GetHomeOutputDirectory() << "\",\n"
|
"\t\t\"directory\": \"" << mf->GetHomeOutputDirectory() << "\",\n"
|
||||||
"\t\t\"default_target\": \"all\",\n"
|
"\t\t\"default_target\": \"all\",\n"
|
||||||
"\t\t\"clean_target\": \"clean\",\n"
|
"\t\t\"clean_target\": \"clean\",\n";
|
||||||
"\t\t\"targets\":[\n";
|
|
||||||
|
|
||||||
const std::string make = mf->GetRequiredDefinition("CMAKE_MAKE_PROGRAM");
|
// build, clean and quick are for the build plugin kate <= 4.12:
|
||||||
const std::string makeArgs = mf->GetSafeDefinition(
|
fout << "\t\t\"build\": \"" << make << " -C " << homeOutputDir
|
||||||
"CMAKE_KATE_MAKE_ARGUMENTS");
|
<< " " << makeArgs << " " << "all\",\n";
|
||||||
const char* homeOutputDir = mf->GetHomeOutputDirectory();
|
fout << "\t\t\"clean\": \"" << make << " -C " << homeOutputDir
|
||||||
|
<< " " << makeArgs << " " << "clean\",\n";
|
||||||
|
fout << "\t\t\"quick\": \"" << make << " -C " << homeOutputDir
|
||||||
|
<< " " << makeArgs << " " << "install\",\n";
|
||||||
|
|
||||||
|
// this is for kate >= 4.13:
|
||||||
|
fout <<
|
||||||
|
"\t\t\"targets\":[\n";
|
||||||
|
|
||||||
this->AppendTarget(fout, "all", make, makeArgs,
|
this->AppendTarget(fout, "all", make, makeArgs,
|
||||||
homeOutputDir, homeOutputDir);
|
homeOutputDir, homeOutputDir);
|
||||||
|
|
Loading…
Reference in New Issue