summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.h
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-05-22 14:24:59 (GMT)
committerAlexander Neundorf <neundorf@kde.org>2007-05-22 14:24:59 (GMT)
commit4878c009057cf410fff98d8450e1e7cd2b3072ae (patch)
treea7ef13ec8a302e2530ec1a1fe5edda141fa9896e /Source/cmTarget.h
parent6be930f0cfca31d62c3dc498b3fc9e756acca710 (diff)
downloadCMake-4878c009057cf410fff98d8450e1e7cd2b3072ae.zip
CMake-4878c009057cf410fff98d8450e1e7cd2b3072ae.tar.gz
CMake-4878c009057cf410fff98d8450e1e7cd2b3072ae.tar.bz2
ENH: add the IMPORT keyword to ADD_EXECUTABLE(), which generates an
"imported" executable target. This can then be used e.g. with ADD_CUSTOM_COMMAND() to generate stuff. It adds a second container for "imported" targets, and FindTarget() now takes an additional argument bool useImportedTargets to specify whether you also want to search in the imported targets or only in the "normal" targets. Alex
Diffstat (limited to 'Source/cmTarget.h')
-rw-r--r--Source/cmTarget.h21
1 files changed, 20 insertions, 1 deletions
diff --git a/Source/cmTarget.h b/Source/cmTarget.h
index aa2d4db..4161b35 100644
--- a/Source/cmTarget.h
+++ b/Source/cmTarget.h
@@ -44,7 +44,7 @@ public:
/**
* Return the type of target.
*/
- TargetType GetType()
+ TargetType GetType() const
{
return this->TargetTypeValue;
}
@@ -54,6 +54,8 @@ public:
*/
void SetType(TargetType f, const char* name);
+ void MarkAsImported();
+
///! Set/Get the name of the target
const char* GetName() const {return this->Name.c_str();}
@@ -161,6 +163,8 @@ public:
const char *GetProperty(const char *prop);
const char *GetProperty(const char *prop, cmProperty::ScopeType scope);
bool GetPropertyAsBool(const char *prop);
+
+ bool IsImported() const {return this->IsImportedTarget;}
/** Get the directory in which this target will be built. If the
configuration name is given then the generator will add its
@@ -327,6 +331,7 @@ private:
void GetFullNameInternal(TargetType type, const char* config, bool implib,
std::string& outPrefix, std::string& outBase,
std::string& outSuffix);
+
void GetLibraryNamesInternal(std::string& name,
std::string& soName,
std::string& realName,
@@ -348,6 +353,19 @@ private:
// Get the full path to the target output directory.
const char* GetOutputDir(bool implib);
+ const char* ImportedGetLocation(const char* config);
+ const char* NormalGetLocation(const char* config);
+
+ void NormalGetFullNameInternal(TargetType type, const char* config, bool implib,
+ std::string& outPrefix, std::string& outBase,
+ std::string& outSuffix);
+ void ImportedGetFullNameInternal(TargetType type, const char* config, bool implib,
+ std::string& outPrefix, std::string& outBase,
+ std::string& outSuffix);
+
+ const char* ImportedGetDirectory(const char* config, bool implib);
+ const char* NormalGetDirectory(const char* config, bool implib);
+
private:
std::string Name;
std::vector<cmCustomCommand> PreBuildCommands;
@@ -376,6 +394,7 @@ private:
cmPropertyMap Properties;
LinkLibraryVectorType OriginalLinkLibraries;
bool DLLPlatform;
+ bool IsImportedTarget;
// The cmMakefile instance that owns this target. This should
// always be set.