1 /*============================================================================
2 CMake - Cross Platform Makefile Generator
3 Copyright 2000-2012 Kitware, Inc., Insight Software Consortium
5 Distributed under the OSI-approved BSD License (the "License");
6 see accompanying file Copyright.txt for details.
8 This software is distributed WITHOUT ANY WARRANTY; without even the
9 implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
10 See the License for more information.
11 ============================================================================*/
12 #ifndef cmGeneratorTarget_h
13 #define cmGeneratorTarget_h
15 #include "cmStandardIncludes.h"
17 class cmCustomCommand;
18 class cmGlobalGenerator;
19 class cmLocalGenerator;
24 class cmGeneratorTarget
27 cmGeneratorTarget(cmTarget*);
30 const char *GetName() const;
31 const char *GetProperty(const char *prop);
32 bool GetPropertyAsBool(const char *prop);
33 std::vector<cmSourceFile*> const& GetSourceFiles();
37 cmLocalGenerator* LocalGenerator;
38 cmGlobalGenerator* GlobalGenerator;
40 /** Sources classified by purpose. */
41 std::vector<cmSourceFile*> CustomCommands;
42 std::vector<cmSourceFile*> ExtraSources;
43 std::vector<cmSourceFile*> HeaderSources;
44 std::vector<cmSourceFile*> ObjectSources;
45 std::vector<cmSourceFile*> ExternalObjects;
46 std::vector<cmSourceFile*> IDLSources;
47 std::string ModuleDefinitionFile;
49 std::map<cmSourceFile const*, std::string> Objects;
50 std::set<cmSourceFile const*> ExplicitObjectName;
52 /** Full path with trailing slash to the top-level directory
53 holding object files for this target. Includes the build
54 time config name placeholder if needed for the generator. */
55 std::string ObjectDirectory;
57 std::vector<cmTarget*> ObjectLibraries;
59 void UseObjectLibraries(std::vector<std::string>& objs);
61 void GetAppleArchs(const char* config,
62 std::vector<std::string>& archVec);
64 ///! Return the rule variable used to create this type of target,
65 // need to add CMAKE_(LANG) for full name.
66 const char* GetCreateRuleVariable();
68 /** Get the include directories for this target. */
69 std::vector<std::string> GetIncludeDirectories(const char *config);
72 void ClassifySources();
73 void LookupObjectLibraries();
75 cmGeneratorTarget(cmGeneratorTarget const&);
76 void operator=(cmGeneratorTarget const&);
79 typedef std::map<cmTarget*, cmGeneratorTarget*> cmGeneratorTargetsType;