[Cmake-commits] CMake branch, next, updated. v2.8.11-2409-g6efb5bd
Clinton Stimpson
clinton at elemtech.com
Mon Jun 3 08:39:03 EDT 2013
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".
The branch, next has been updated
via 6efb5bd292096243ca6cd69be9db38fe6693862b (commit)
via 483e208482ff46532e7ae48659e569580a88af9c (commit)
from 0f4bade9cebed87218859b927320b70daedd4b6b (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=6efb5bd292096243ca6cd69be9db38fe6693862b
commit 6efb5bd292096243ca6cd69be9db38fe6693862b
Merge: 0f4bade 483e208
Author: Clinton Stimpson <clinton at elemtech.com>
AuthorDate: Mon Jun 3 08:39:00 2013 -0400
Commit: CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Mon Jun 3 08:39:00 2013 -0400
Merge topic 'cfbundle-location' into next
483e208 OS X: Fix getting of CFBundle LOCATION property.
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=483e208482ff46532e7ae48659e569580a88af9c
commit 483e208482ff46532e7ae48659e569580a88af9c
Author: Clinton Stimpson <clinton at elemtech.com>
AuthorDate: Sat Jun 1 22:47:18 2013 -0600
Commit: Clinton Stimpson <clinton at elemtech.com>
CommitDate: Mon Jun 3 06:29:33 2013 -0600
OS X: Fix getting of CFBundle LOCATION property.
This fixes bug #13797.
The kinds of changes applied in 373faae5 for frameworks are now
applied to CFBundle. The prefix and suffix for CFBundles are
now handled in cmTarget::GetFullNameInternal.
diff --git a/Source/cmExportInstallFileGenerator.cxx b/Source/cmExportInstallFileGenerator.cxx
index fff807c..f3fda71 100644
--- a/Source/cmExportInstallFileGenerator.cxx
+++ b/Source/cmExportInstallFileGenerator.cxx
@@ -351,21 +351,7 @@ cmExportInstallFileGenerator
prop += suffix;
// Append the installed file name.
- if(target->IsCFBundleOnApple())
- {
- const char *ext = target->GetProperty("BUNDLE_EXTENSION");
- if (!ext)
- {
- ext = "bundle";
- }
-
- value += itgen->GetInstallFilename(target, config);
- value += ".";
- value += ext;
- value += "/";
- value += itgen->GetInstallFilename(target, config);
- }
- else if(target->IsAppBundleOnApple())
+ if(target->IsAppBundleOnApple())
{
value += itgen->GetInstallFilename(target, config);
value += ".app/Contents/MacOS/";
diff --git a/Source/cmGlobalXCodeGenerator.cxx b/Source/cmGlobalXCodeGenerator.cxx
index 240d60c..00a06bc 100644
--- a/Source/cmGlobalXCodeGenerator.cxx
+++ b/Source/cmGlobalXCodeGenerator.cxx
@@ -746,12 +746,6 @@ cmGlobalXCodeGenerator::CreateXCodeSourceFile(cmLocalGenerator* lg,
}
}
- if(cmtarget.IsCFBundleOnApple())
- {
- cmtarget.SetProperty("PREFIX", "");
- cmtarget.SetProperty("SUFFIX", "");
- }
-
// Add the fileRef to the top level Resources group/folder if it is not
// already there.
//
@@ -1823,7 +1817,7 @@ void cmGlobalXCodeGenerator::CreateBuildSettings(cmTarget& target,
pndir = target.GetDirectory(configName);
}
- if(target.IsFrameworkOnApple())
+ if(target.IsFrameworkOnApple() || target.IsCFBundleOnApple())
{
pnprefix = "";
}
diff --git a/Source/cmMakefileLibraryTargetGenerator.cxx b/Source/cmMakefileLibraryTargetGenerator.cxx
index 3edaa44..347f26d 100644
--- a/Source/cmMakefileLibraryTargetGenerator.cxx
+++ b/Source/cmMakefileLibraryTargetGenerator.cxx
@@ -24,8 +24,6 @@ cmMakefileLibraryTargetGenerator
::cmMakefileLibraryTargetGenerator(cmTarget* target):
cmMakefileTargetGenerator(target)
{
- cmOSXBundleGenerator::PrepareTargetProperties(this->Target);
-
this->CustomCommandDriver = OnDepends;
this->Target->GetLibraryNames(
this->TargetNameOut, this->TargetNameSO, this->TargetNameReal,
diff --git a/Source/cmNinjaNormalTargetGenerator.cxx b/Source/cmNinjaNormalTargetGenerator.cxx
index e5a6eab..4a7d2f4 100644
--- a/Source/cmNinjaNormalTargetGenerator.cxx
+++ b/Source/cmNinjaNormalTargetGenerator.cxx
@@ -36,8 +36,6 @@ cmNinjaNormalTargetGenerator(cmTarget* target)
, TargetNamePDB()
, TargetLinkLanguage(0)
{
- cmOSXBundleGenerator::PrepareTargetProperties(target);
-
this->TargetLinkLanguage = target->GetLinkerLanguage(this->GetConfigName());
if (target->GetType() == cmTarget::EXECUTABLE)
target->GetExecutableNames(this->TargetNameOut,
diff --git a/Source/cmOSXBundleGenerator.cxx b/Source/cmOSXBundleGenerator.cxx
index 621a49f..d3cdf85 100644
--- a/Source/cmOSXBundleGenerator.cxx
+++ b/Source/cmOSXBundleGenerator.cxx
@@ -16,15 +16,6 @@
#include <cassert>
-void cmOSXBundleGenerator::PrepareTargetProperties(cmTarget* target)
-{
- if(target->IsCFBundleOnApple())
- {
- target->SetProperty("PREFIX", "");
- target->SetProperty("SUFFIX", "");
- }
-}
-
//----------------------------------------------------------------------------
cmOSXBundleGenerator::
cmOSXBundleGenerator(cmTarget* target,
@@ -173,31 +164,27 @@ void cmOSXBundleGenerator::CreateFramework(
//----------------------------------------------------------------------------
void cmOSXBundleGenerator::CreateCFBundle(const std::string& targetName,
- std::string& outpath)
+ const std::string& root)
{
if (this->MustSkip())
return;
// Compute bundle directory names.
- std::string out = outpath;
+ std::string out = root;
out += "/";
- out += this->Target->GetCFBundleDirectory(this->ConfigName, true);
- std::string top = out;
- out += "/MacOS";
+ out += this->Target->GetCFBundleDirectory(this->ConfigName, false);
cmSystemTools::MakeDirectory(out.c_str());
this->Makefile->AddCMakeOutputFile(out.c_str());
- std::string newoutpath = out;
-
// Configure the Info.plist file. Note that it needs the executable name
// to be set.
- std::string plist = top;
+ std::string plist =
+ this->Target->GetCFBundleDirectory(this->ConfigName, true);
plist += "/Info.plist";
this->LocalGenerator->GenerateAppleInfoPList(this->Target,
targetName.c_str(),
plist.c_str());
this->Makefile->AddCMakeOutputFile(plist.c_str());
- outpath = newoutpath;
}
//----------------------------------------------------------------------------
diff --git a/Source/cmOSXBundleGenerator.h b/Source/cmOSXBundleGenerator.h
index 6cf81d2..ec82b9a 100644
--- a/Source/cmOSXBundleGenerator.h
+++ b/Source/cmOSXBundleGenerator.h
@@ -25,8 +25,6 @@ class cmLocalGenerator;
class cmOSXBundleGenerator
{
public:
- static void PrepareTargetProperties(cmTarget* target);
-
cmOSXBundleGenerator(cmTarget* target,
const char* configName);
@@ -38,9 +36,9 @@ public:
void CreateFramework(const std::string& targetName,
const std::string& root);
- // create a cf bundle at a given root and return the
- // directory within the bundle that contains the library
- void CreateCFBundle(const std::string& targetName, std::string& outpath);
+ // create a cf bundle at a given root
+ void CreateCFBundle(const std::string& targetName,
+ const std::string& root);
struct MacOSXContentGeneratorType
{
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 093b30e..fb6d0a8 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3278,7 +3278,7 @@ const char* cmTarget::NormalGetLocation(const char* config)
this->Location += cfgid;
}
- if(this->IsCFBundleOnApple() || this->IsAppBundleOnApple())
+ if(this->IsAppBundleOnApple())
{
std::string macdir = this->BuildMacContentDirectory("", config, false);
if(!macdir.empty())
@@ -3891,7 +3891,7 @@ std::string cmTarget::NormalGetFullPath(const char* config, bool implib,
{
std::string fpath = this->GetDirectory(config, implib);
fpath += "/";
- if(this->IsCFBundleOnApple() || this->IsAppBundleOnApple())
+ if(this->IsAppBundleOnApple())
{
fpath = this->BuildMacContentDirectory(fpath, config, false);
fpath += "/";
@@ -4037,6 +4037,21 @@ void cmTarget::GetFullNameInternal(const char* config,
targetSuffix = 0;
}
+ if(this->IsCFBundleOnApple())
+ {
+ fw_prefix = this->GetOutputName(config, false);
+ fw_prefix += ".";
+ const char *ext = this->GetProperty("BUNDLE_EXTENSION");
+ if (!ext)
+ {
+ ext = "bundle";
+ }
+ fw_prefix += ext;
+ fw_prefix += "/Contents/MacOS/";
+ targetPrefix = fw_prefix.c_str();
+ targetSuffix = 0;
+ }
+
// Begin the final name with the prefix.
outPrefix = targetPrefix?targetPrefix:"";
diff --git a/Tests/CFBundleTest/CMakeLists.txt b/Tests/CFBundleTest/CMakeLists.txt
index 8fd9efd..bf9771c 100644
--- a/Tests/CFBundleTest/CMakeLists.txt
+++ b/Tests/CFBundleTest/CMakeLists.txt
@@ -54,3 +54,5 @@ set_source_files_properties(
${CMAKE_CURRENT_BINARY_DIR}/InfoPlist.strings
${CMAKE_CURRENT_BINARY_DIR}/Localized.rsrc
PROPERTIES MACOSX_PACKAGE_LOCATION "Resources/English.lproj")
+
+export(TARGETS CFBundleTest FILE ${CMAKE_CURRENT_BINARY_DIR}/exp.cmake)
-----------------------------------------------------------------------
Summary of changes:
Source/cmExportInstallFileGenerator.cxx | 16 +---------------
Source/cmGlobalXCodeGenerator.cxx | 8 +-------
Source/cmMakefileLibraryTargetGenerator.cxx | 2 --
Source/cmNinjaNormalTargetGenerator.cxx | 2 --
Source/cmOSXBundleGenerator.cxx | 23 +++++------------------
Source/cmOSXBundleGenerator.h | 8 +++-----
Source/cmTarget.cxx | 19 +++++++++++++++++--
Tests/CFBundleTest/CMakeLists.txt | 2 ++
8 files changed, 29 insertions(+), 51 deletions(-)
hooks/post-receive
--
CMake
More information about the Cmake-commits
mailing list