summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorDavid Cole <david.cole@kitware.com>2007-08-01 17:04:45 (GMT)
committerDavid Cole <david.cole@kitware.com>2007-08-01 17:04:45 (GMT)
commitee91e2549921075b02f0a88fb48323b1c015228c (patch)
treee4189d3f1043bfc292981ceff2e7bf00bbf548ea /Source
parenta0533be267e0304b3a13f17c3adc660e8a830f71 (diff)
downloadCMake-ee91e2549921075b02f0a88fb48323b1c015228c.zip
CMake-ee91e2549921075b02f0a88fb48323b1c015228c.tar.gz
CMake-ee91e2549921075b02f0a88fb48323b1c015228c.tar.bz2
BUG: Only pay attention to the FRAMEWORK target property for SHARED library targets
Diffstat (limited to 'Source')
-rw-r--r--Source/cmGlobalXCodeGenerator.cxx9
-rw-r--r--Source/cmLocalGenerator.cxx3
-rw-r--r--Source/cmMakefileLibraryTargetGenerator.cxx5
-rw-r--r--Source/cmTarget.cxx6
4 files changed, 15 insertions, 8 deletions
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 7a66cf5..f4c6411 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -727,7 +727,8 @@ cmGlobalXCodeGenerator::CreateXCodeTargets(cmLocalGenerator* gen,
buildFiles->AddObject(xsf);
}
}
- if(cmtarget.GetPropertyAsBool("FRAMEWORK"))
+ if (cmtarget.GetType() == cmTarget::SHARED_LIBRARY &&
+ cmtarget.GetPropertyAsBool("FRAMEWORK"))
{
this->AddFrameworkPhases(&cmtarget, buildPhases);
}
@@ -1239,7 +1240,8 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
target.GetType() == cmTarget::EXECUTABLE)
{
std::string pndir = target.GetDirectory();
- if(target.GetPropertyAsBool("FRAMEWORK"))
+ if (target.GetType() == cmTarget::SHARED_LIBRARY &&
+ target.GetPropertyAsBool("FRAMEWORK"))
{
pndir += "/..";
pndir = cmSystemTools::CollapseFullPath(pndir.c_str());
@@ -2053,7 +2055,8 @@ void cmGlobalXCodeGenerator::CreateGroups(cmLocalGenerator* root,
}
std::vector<cmSourceFile*> classes = cmtarget.GetSourceFiles();
// add framework copy headers
- if(cmtarget.GetPropertyAsBool("FRAMEWORK"))
+ if (cmtarget.GetType() == cmTarget::SHARED_LIBRARY &&
+ cmtarget.GetPropertyAsBool("FRAMEWORK"))
{
const char* headers = cmtarget.GetProperty("FRAMEWORK_PUBLIC_HEADERS");
if(!headers)
diff --git a/Source/cmLocalGenerator.cxx b/Source/cmLocalGenerator.cxx
index bcf89e1..9912c6f 100644
--- a/Source/cmLocalGenerator.cxx
+++ b/Source/cmLocalGenerator.cxx
@@ -1775,7 +1775,8 @@ void cmLocalGenerator
// do not add the target full name but just use the directory
// name
#ifdef __APPLE__
- if(!tgt->GetPropertyAsBool("FRAMEWORK"))
+ if (!(tgt->GetType() == cmTarget::SHARED_LIBRARY &&
+ tgt->GetPropertyAsBool("FRAMEWORK")))
#endif
{
linkItem += "/";
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 9ec7f98..2025f25 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -112,7 +112,7 @@ void cmMakefileLibraryTargetGenerator::WriteStaticLibraryRules()
void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink)
{
#ifdef __APPLE__
- if(this->Target->GetPropertyAsBool("FRAMEWORK"))
+ if (this->Target->GetPropertyAsBool("FRAMEWORK"))
{
this->WriteFrameworkRules(relink);
return;
@@ -505,7 +505,8 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules
}
#if defined(__APPLE__)
// If we're creating a framework, place the output into a framework directory
- if(this->Target->GetPropertyAsBool("FRAMEWORK"))
+ if (this->Target->GetType() == cmTarget::SHARED_LIBRARY &&
+ this->Target->GetPropertyAsBool("FRAMEWORK"))
{
this->CreateFramework(targetName, outpath);
}
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 1ca187d..c4b6e34 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1790,7 +1790,8 @@ void cmTarget::NormalGetFullNameInternal(TargetType type,
}
#if defined(__APPLE__)
// frameworks do not have a prefix or a suffix
- if(this->GetPropertyAsBool("FRAMEWORK"))
+ if (this->GetType() == cmTarget::SHARED_LIBRARY &&
+ this->GetPropertyAsBool("FRAMEWORK"))
{
targetPrefix = 0;
targetSuffix = 0;
@@ -2322,7 +2323,8 @@ const char* cmTarget::GetOutputDir(bool implib)
#if defined(__APPLE__)
// frameworks do not have a prefix or a suffix
- if(this->GetPropertyAsBool("FRAMEWORK"))
+ if (this->GetType() == cmTarget::SHARED_LIBRARY &&
+ this->GetPropertyAsBool("FRAMEWORK"))
{
out += "/";
out += this->GetFullName(0, implib);