ENH: put the 64 bit paths first
[cmake.git] / Source / cmGlobalKdevelopGenerator.h
blob3f927c223bf6788d28e588edb8d80531a82ab8f8
1 /*=========================================================================
3 Program: CMake - Cross-Platform Makefile Generator
4 Module: $RCSfile: cmGlobalKdevelopGenerator.h,v $
5 Language: C++
6 Date: $Date: 2008-03-27 21:40:43 $
7 Version: $Revision: 1.8 $
9 Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved.
10 Copyright (c) 2004 Alexander Neundorf, neundorf@kde.org. All rights reserved.
11 See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details.
13 This software is distributed WITHOUT ANY WARRANTY; without even
14 the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15 PURPOSE. See the above copyright notices for more information.
17 =========================================================================*/
18 #ifndef cmGlobalKdevelopGenerator_h
19 #define cmGlobalKdevelopGenerator_h
21 #include "cmExternalMakefileProjectGenerator.h"
23 class cmLocalGenerator;
25 /** \class cmGlobalKdevelopGenerator
26 * \brief Write Unix Makefiles accompanied by KDevelop3 project files.
28 * cmGlobalKdevelopGenerator produces a project file for KDevelop 3 (KDevelop
29 * > 3.1.1). The project is based on the "Custom Makefile based C/C++"
30 * project of KDevelop. Such a project consists of Unix Makefiles in the
31 * build directory together with a <your_project>.kdevelop project file,
32 * which contains the project settings and a <your_project>.kdevelop.filelist
33 * file, which lists the source files relative to the kdevelop project
34 * directory. The kdevelop project directory is the base source directory.
36 class cmGlobalKdevelopGenerator : public cmExternalMakefileProjectGenerator
38 public:
39 cmGlobalKdevelopGenerator();
41 virtual const char* GetName() const
42 { return cmGlobalKdevelopGenerator::GetActualName();}
43 static const char* GetActualName() { return "KDevelop3";}
44 static cmExternalMakefileProjectGenerator* New()
45 { return new cmGlobalKdevelopGenerator; }
46 /** Get the documentation entry for this generator. */
47 virtual void GetDocumentation(cmDocumentationEntry& entry,
48 const char* fullName) const;
50 virtual void Generate();
51 private:
52 /*** Create the foo.kdevelop.filelist file, return false if it doesn't
53 succeed. If the file already exists the contents will be merged.
55 bool CreateFilelistFile(const std::vector<cmLocalGenerator*>& lgs,
56 const std::string& outputDir,
57 const std::string& projectDirIn,
58 const std::string& projectname,
59 std::string& cmakeFilePattern,
60 std::string& fileToOpen);
62 /** Create the foo.kdevelop file. This one calls MergeProjectFiles()
63 if it already exists, otherwise createNewProjectFile() The project
64 files will be created in \a outputDir (in the build tree), the
65 kdevelop project dir will be set to \a projectDir (in the source
66 tree). \a cmakeFilePattern consists of a lists of all cmake
67 listfiles used by this CMakeLists.txt */
68 void CreateProjectFile(const std::string& outputDir,
69 const std::string& projectDir,
70 const std::string& projectname,
71 const std::string& executable,
72 const std::string& cmakeFilePattern,
73 const std::string& fileToOpen);
75 /*** Reads the old foo.kdevelop line by line and only replaces the
76 "important" lines
78 void MergeProjectFiles(const std::string& outputDir,
79 const std::string& projectDir,
80 const std::string& filename,
81 const std::string& executable,
82 const std::string& cmakeFilePattern,
83 const std::string& fileToOpen,
84 const std::string& sessionFilename);
85 ///! Creates a new foo.kdevelop and a new foo.kdevses file
86 void CreateNewProjectFile(const std::string& outputDir,
87 const std::string& projectDir,
88 const std::string& filename,
89 const std::string& executable,
90 const std::string& cmakeFilePattern,
91 const std::string& fileToOpen,
92 const std::string& sessionFilename);
94 std::vector<std::string> Blacklist;
97 #endif