From 28ea03473785eddce544704306a239407a8f79bb Mon Sep 17 00:00:00 2001 From: Brad King Date: Mon, 28 Jan 2008 13:05:58 -0500 Subject: 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 --- Source/cmExportFileGenerator.cxx | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'Source/cmExportFileGenerator.cxx') diff --git a/Source/cmExportFileGenerator.cxx b/Source/cmExportFileGenerator.cxx index ec4bc33469..2c916e54e6 100644 --- a/Source/cmExportFileGenerator.cxx +++ b/Source/cmExportFileGenerator.cxx @@ -237,10 +237,21 @@ cmExportFileGenerator default: // should never happen break; } + + // Mark the imported executable if it has exports. if(target->IsExecutableWithExports()) { os << "SET_PROPERTY(TARGET " << targetName - << " PROPERTY IMPORTED_ENABLE_EXPORTS 1)\n"; + << " PROPERTY ENABLE_EXPORTS 1)\n"; + } + + // Mark the imported framework. This is done even on non-Apple + // platforms for reference and consistency purposes. + if(target->GetType() == cmTarget::SHARED_LIBRARY && + target->GetPropertyAsBool("FRAMEWORK")) + { + os << "SET_PROPERTY(TARGET " << targetName + << " PROPERTY FRAMEWORK 1)\n"; } os << "\n"; } -- cgit v1.2.1