diff options
author | Brad King <brad.king@kitware.com> | 2008-01-28 18:05:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2008-01-28 18:05:58 (GMT) |
commit | 28ea03473785eddce544704306a239407a8f79bb (patch) | |
tree | ee4df3ce5aebf8d96f679db2b26304efb90fe9ba /Source/cmMakefileLibraryTargetGenerator.cxx | |
parent | 3d94b3b7170b17f119608a896f2e86cba23b6c5b (diff) | |
download | CMake-28ea03473785eddce544704306a239407a8f79bb.zip CMake-28ea03473785eddce544704306a239407a8f79bb.tar.gz CMake-28ea03473785eddce544704306a239407a8f79bb.tar.bz2 |
ENH: Support exporting/importing of Framework targets.
- Imported frameworks have the FRAMEWORK property set
- Added cmTarget::IsFrameworkOnApple method to simplify checks
- Also remove separate IMPORTED_ENABLE_EXPORTS property and just use ENABLE_EXPORTS since, like FRAMEWORK, it just represents the target type.
- Document FRAMEWORK keyword in INSTALL command.
- Updated IMPORTED_LOCATION property documentation for Frameworks
Diffstat (limited to 'Source/cmMakefileLibraryTargetGenerator.cxx')
-rw-r--r-- | Source/cmMakefileLibraryTargetGenerator.cxx | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx index 40bbdf2..9ab4649 100644 --- a/Source/cmMakefileLibraryTargetGenerator.cxx +++ b/Source/cmMakefileLibraryTargetGenerator.cxx @@ -111,13 +111,11 @@ void cmMakefileLibraryTargetGenerator::WriteStaticLibraryRules() //---------------------------------------------------------------------------- void cmMakefileLibraryTargetGenerator::WriteSharedLibraryRules(bool relink) { -#ifdef __APPLE__ - if (this->Target->GetPropertyAsBool("FRAMEWORK")) + if(this->Target->IsFrameworkOnApple()) { this->WriteFrameworkRules(relink); return; } -#endif const char* linkLanguage = this->Target->GetLinkerLanguage(this->GlobalGenerator); std::string linkRuleVar = "CMAKE_"; @@ -479,14 +477,13 @@ void cmMakefileLibraryTargetGenerator::WriteLibraryRules outpathImp += "/"; } } -#if defined(__APPLE__) + // If we're creating a framework, place the output into a framework directory - if (this->Target->GetType() == cmTarget::SHARED_LIBRARY && - this->Target->GetPropertyAsBool("FRAMEWORK")) + if(this->Target->IsFrameworkOnApple()) { this->CreateFramework(targetName, outpath); } -#endif + std::string targetFullPath = outpath + targetName; std::string targetFullPathPDB = outpath + targetNamePDB; std::string targetFullPathSO = outpath + targetNameSO; |