diff options
author | Brad King <brad.king@kitware.com> | 2011-02-22 19:30:58 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2011-02-22 19:30:58 (GMT) |
commit | 64d997a78c1f2a24a8fd1978856a2b5f4a97a0f9 (patch) | |
tree | a3b002c20c5717e463455b985c031e02b12b861f /Source/cmTarget.cxx | |
parent | 6ec1ae2108afb8d9a72783fe945ad2410f08b4c1 (diff) | |
parent | cabc407912bb3bc0bb954e317a999cb2ee64de57 (diff) | |
download | CMake-64d997a78c1f2a24a8fd1978856a2b5f4a97a0f9.zip CMake-64d997a78c1f2a24a8fd1978856a2b5f4a97a0f9.tar.gz CMake-64d997a78c1f2a24a8fd1978856a2b5f4a97a0f9.tar.bz2 |
Merge topic 'fix-11295-support-plugin-bundles-on-mac'
cabc407 CFBundle Test: Add PATHS for finding Rez (#11295)
5457b82 Add support for CFBundle targets on the Mac (#11295)
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 72efce3..75ff712 100644 --- a/Source/cmTarget.cxx +++ b/Source/cmTarget.cxx @@ -188,6 +188,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 " @@ -1211,6 +1227,14 @@ bool cmTarget::IsAppBundleOnApple() } //---------------------------------------------------------------------------- +bool cmTarget::IsCFBundleOnApple() +{ + return (this->GetType() == cmTarget::MODULE_LIBRARY && + this->Makefile->IsOn("APPLE") && + this->GetPropertyAsBool("BUNDLE")); +} + +//---------------------------------------------------------------------------- class cmTargetTraceDependencies { public: |