20 #ifndef cmCPluginAPI_h 21 #define cmCPluginAPI_h 23 #define CMAKE_VERSION_MAJOR 2 24 #define CMAKE_VERSION_MINOR 5 49 void *(CCONV *GetClientData) (
void *info);
51 int (CCONV *GetTotalArgumentSize) (
int argc,
char **argv);
53 void (CCONV *FreeArguments) (
int argc,
char **argv);
57 void (CCONV *SetClientData) (
void *info,
void *cd);
59 void (CCONV *SetError) (
void *info,
const char *err);
66 void (CCONV *AddCacheDefinition) (
void *mf,
const char* name,
68 const char* doc,
int cachetype);
69 void (CCONV *AddCustomCommand) (
void *mf,
const char* source,
71 int numArgs,
const char **args,
72 int numDepends,
const char **depends,
73 int numOutputs,
const char **outputs,
75 void (CCONV *AddDefineFlag) (
void *mf,
const char* definition);
76 void (CCONV *AddDefinition) (
void *mf,
const char* name,
78 void (CCONV *AddExecutable) (
void *mf,
const char *exename,
79 int numSrcs,
const char **srcs,
int win32);
80 void (CCONV *AddLibrary) (
void *mf,
const char *libname,
81 int shared,
int numSrcs,
const char **srcs);
82 void (CCONV *AddLinkDirectoryForTarget) (
void *mf,
const char *tgt,
84 void (CCONV *AddLinkLibraryForTarget) (
void *mf,
const char *tgt,
85 const char *libname,
int libtype);
86 void (CCONV *AddUtilityCommand) (
void *mf,
const char* utilityName,
87 const char *command,
const char *arguments,
88 int all,
int numDepends,
const char **depends,
89 int numOutputs,
const char **outputs);
90 int (CCONV *CommandExists) (
void *mf,
const char* name);
91 int (CCONV *ExecuteCommand) (
void *mf,
const char *name,
92 int numArgs,
const char **args);
93 void (CCONV *ExpandSourceListArguments) (
void *mf,
int argc,
95 int *resArgc,
char ***resArgv,
96 unsigned int startArgumentIndex);
97 char *(CCONV *ExpandVariablesInString) (
void *mf,
const char *source,
98 int escapeQuotes,
int atOnly);
99 unsigned int (CCONV *GetCacheMajorVersion) (
void *mf);
100 unsigned int (CCONV *GetCacheMinorVersion) (
void *mf);
101 const char* (CCONV *GetCurrentDirectory) (
void *mf);
102 const char* (CCONV *GetCurrentOutputDirectory) (
void *mf);
103 const char* (CCONV *GetDefinition) (
void *mf,
const char *def);
104 const char* (CCONV *GetHomeDirectory) (
void *mf);
105 const char* (CCONV *GetHomeOutputDirectory) (
void *mf);
106 unsigned int (CCONV *GetMajorVersion) (
void *mf);
107 unsigned int (CCONV *GetMinorVersion) (
void *mf);
108 const char* (CCONV *GetProjectName) (
void *mf);
109 const char* (CCONV *GetStartDirectory) (
void *mf);
110 const char* (CCONV *GetStartOutputDirectory) (
void *mf);
111 int (CCONV *IsOn) (
void *mf,
const char* name);
119 void *(CCONV *AddSource) (
void *mf,
void *sf);
120 void *(CCONV *CreateSourceFile) ();
121 void (CCONV *DestroySourceFile) (
void *sf);
122 void *(CCONV *GetSource) (
void *mf,
const char* sourceName);
123 void (CCONV *SourceFileAddDepend) (
void *sf,
const char *depend);
124 const char *(CCONV *SourceFileGetProperty) (
void *sf,
const char *prop);
125 int (CCONV *SourceFileGetPropertyAsBool) (
void *sf,
const char *prop);
126 const char *(CCONV *SourceFileGetSourceName) (
void *sf);
127 const char *(CCONV *SourceFileGetFullPath) (
void *sf);
128 void (CCONV *SourceFileSetName) (
void *sf,
const char* name,
130 int numSourceExtensions,
131 const char **sourceExtensions,
132 int numHeaderExtensions,
133 const char **headerExtensions);
134 void (CCONV *SourceFileSetName2) (
void *sf,
const char* name,
136 const char *ext,
int headerFileOnly);
137 void (CCONV *SourceFileSetProperty) (
void *sf,
const char *prop,
145 char *(CCONV *Capitalized)(
const char *);
146 void (CCONV *CopyFileIfDifferent)(
const char *f1,
const char *f2);
147 char *(CCONV *GetFilenameWithoutExtension)(
const char *);
148 char *(CCONV *GetFilenamePath)(
const char *);
149 void (CCONV *RemoveFile)(
const char *f1);
150 void (CCONV *Free)(
void *);
155 void (CCONV *AddCustomCommandToOutput) (
void *mf,
const char* output,
157 int numArgs,
const char **args,
158 const char* main_dependency,
159 int numDepends,
const char **depends);
160 void (CCONV *AddCustomCommandToTarget) (
void *mf,
const char* target,
162 int numArgs,
const char **args,
166 void (CCONV *DisplaySatus) (
void *info,
const char *message);
169 void *(CCONV *CreateNewSourceFile) (
void *mf);
170 void (CCONV *DefineSourceFileProperty) (
void *mf,
const char *name,
171 const char *briefDocs,
172 const char *longDocs,
183 #define CM_PLUGIN_EXPORT __declspec( dllexport ) 185 #define CM_PLUGIN_EXPORT 192 #define CM_CACHE_BOOL 0 193 #define CM_CACHE_PATH 1 194 #define CM_CACHE_FILEPATH 2 195 #define CM_CACHE_STRING 3 196 #define CM_CACHE_INTERNAL 4 197 #define CM_CACHE_STATIC 5 202 #define CM_LIBRARY_GENERAL 0 203 #define CM_LIBRARY_DEBUG 1 204 #define CM_LIBRARY_OPTIMIZED 2 209 #define CM_PRE_BUILD 0 210 #define CM_PRE_LINK 1 211 #define CM_POST_BUILD 2 216 typedef const char* (CCONV *CM_DOC_FUNCTION)();
217 typedef int (CCONV *CM_INITIAL_PASS_FUNCTION)(
void *info,
void *mf,
219 typedef void (CCONV *CM_FINAL_PASS_FUNCTION)(
void *info,
void *mf);
220 typedef void (CCONV *CM_DESTRUCTOR_FUNCTION)(
void *info);
223 unsigned long reserved1;
224 unsigned long reserved2;
227 CM_INITIAL_PASS_FUNCTION InitialPass;
228 CM_FINAL_PASS_FUNCTION FinalPass;
229 CM_DESTRUCTOR_FUNCTION Destructor;
230 CM_DOC_FUNCTION GetTerseDocumentation;
231 CM_DOC_FUNCTION GetFullDocumentation;