diff options
author | Richard Bateman <taxilian@gmail.com> | 2010-10-07 02:43:04 (GMT) |
---|---|---|
committer | David Cole <david.cole@kitware.com> | 2011-01-11 17:54:44 (GMT) |
commit | 5457b8254cb43e002fe90b7c81ae65134ec12b24 (patch) | |
tree | 5eddb832a213487dd64cd8adb5c2ea88bb3d2baa /Source/cmTarget.cxx | |
parent | 6754b26bf0bb69ad6d65249bf4122dbbda446922 (diff) | |
download | CMake-5457b8254cb43e002fe90b7c81ae65134ec12b24.zip CMake-5457b8254cb43e002fe90b7c81ae65134ec12b24.tar.gz CMake-5457b8254cb43e002fe90b7c81ae65134ec12b24.tar.bz2 |
Add support for CFBundle targets on the Mac (#11295)
This commit enables building, for example, plugin bundles
to be loaded by web browsers.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r-- | Source/cmTarget.cxx | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx index 9a698c0..6e33b71 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -194,6 +194,22 @@ void cmTarget::DefineProperties(cmake *cm) "the target is built."); cm->DefineProperty + ("BUNDLE", cmProperty::TARGET, + "This target is a CFBundle on the Mac.", + "If a module library target has this property set to true it will " + "be built as a CFBundle when built on the mac. It will have the " + "directory structure required for a CFBundle and will be suitable " + "to be used for creating Browser Plugins or other application " + "resources."); + + cm->DefineProperty + ("BUNDLE_EXTENSION", cmProperty::TARGET, + "The file extension used to name a BUNDLE target on the Mac.", + "The default value is \"bundle\" - you can also use \"plugin\" or " + "whatever file extension is required by the host app for your " + "bundle."); + + cm->DefineProperty ("FRAMEWORK", cmProperty::TARGET, "This target is a framework on the Mac.", "If a shared library target has this property set to true it will " @@ -1204,6 +1220,14 @@ bool cmTarget::IsAppBundleOnApple() } //---------------------------------------------------------------------------- +bool cmTarget::IsCFBundleOnApple() +{ + return (this->GetType() == cmTarget::MODULE_LIBRARY && + this->Makefile->IsOn("APPLE") && + this->GetPropertyAsBool("BUNDLE")); +} + +//---------------------------------------------------------------------------- class cmTargetTraceDependencies { public: |