summaryrefslogtreecommitdiff
path: root/Source/cmTarget.h
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2008-02-18 16:38:34 -0500
committerBrad King <brad.king@kitware.com>2008-02-18 16:38:34 -0500
commit9ed42663068bc8f5bc2510a2fb19b574c06f3a1f (patch)
tree46768f04a5bc810e9b5abc1011b8ddd7a6bcbd95 /Source/cmTarget.h
parenta3781c85fcaee3f49b95e101317a19594f575c98 (diff)
downloadcmake-9ed42663068bc8f5bc2510a2fb19b574c06f3a1f.tar.gz
ENH: Cleanup impl of PUBLIC_HEADER, PRIVATE_HEADER, and RESOURCE properties
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r--Source/cmTarget.h37
1 files changed, 33 insertions, 4 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index 11b7671b8f..ad5a81534e 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -53,6 +53,19 @@ struct cmTargetLinkInterfaceMap:
~cmTargetLinkInterfaceMap();
};
+class cmTargetInternals;
+class cmTargetInternalPointer
+{
+public:
+ cmTargetInternalPointer();
+ cmTargetInternalPointer(cmTargetInternalPointer const& r);
+ ~cmTargetInternalPointer();
+ cmTargetInternalPointer& operator=(cmTargetInternalPointer const& r);
+ cmTargetInternals* operator->() const { return this->Pointer; }
+private:
+ cmTargetInternals* Pointer;
+};
+
/** \class cmTarget
* \brief Represent a library or executable target loaded from a makefile.
*
@@ -115,12 +128,22 @@ public:
* Flags for a given source file as used in this target. Typically assigned
* via SET_TARGET_PROPERTIES when the property is a list of source files.
*/
+ enum SourceFileType
+ {
+ SourceFileTypeNormal,
+ SourceFileTypePrivateHeader, // is in "PRIVATE_HEADER" target property
+ SourceFileTypePublicHeader, // is in "PUBLIC_HEADER" target property
+ SourceFileTypeResource, // is in "RESOURCE" target property *or*
+ // has MACOSX_PACKAGE_LOCATION=="Resources"
+ SourceFileTypeMacContent // has MACOSX_PACKAGE_LOCATION!="Resources"
+ };
struct SourceFileFlags
{
- bool PrivateHeader; // source is in "PRIVATE_HEADER" target property
- bool PublicHeader; // source is in "PUBLIC_HEADER" target property
- bool Resource; // source is in "RESOURCE" target property *or*
- // source has MACOSX_PACKAGE_LOCATION=="Resources"
+ SourceFileFlags(): Type(SourceFileTypeNormal), MacFolder(0) {}
+ SourceFileFlags(SourceFileFlags const& r):
+ Type(r.Type), MacFolder(r.MacFolder) {}
+ SourceFileType Type;
+ const char* MacFolder; // location inside Mac content folders
};
/**
@@ -497,6 +520,12 @@ private:
// The cmMakefile instance that owns this target. This should
// always be set.
cmMakefile* Makefile;
+
+ // Internal representation details.
+ friend class cmTargetInternals;
+ cmTargetInternalPointer Internal;
+
+ void ConstructSourceFileFlags();
};
typedef std::map<cmStdString,cmTarget> cmTargets;