[cmake-developers] [CMake 0012942]: Would like to specify a different default location for OSX binary
Mantis Bug Tracker
mantis at public.kitware.com
Tue Feb 7 16:53:35 EST 2012
The following issue has been SUBMITTED.
======================================================================
http://public.kitware.com/Bug/view.php?id=12942
======================================================================
Reported By: Michael Pechner
Assigned To:
======================================================================
Project: CMake
Issue ID: 12942
Category: CMake
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 2012-02-07 16:53 EST
Last Modified: 2012-02-07 16:53 EST
======================================================================
Summary: Would like to specify a different default location
for OSX binary
Description:
We don't put our apps in the default location. We have a change to
cmTarget.cxx to make this happen.
We means I finally got permission to report changes my employer made to the code
base.
Additional Information:
We defines a new property:
cm->DefineProperty
("MACOSX_BUNDLE_BINARY_PATH", cmProperty::TARGET,
"If unset, the actual linked binary is assumed to be in ",
"appname.app/Contents/MacOS/appname, if set, then ",
"appname.app/MACOSX_BUNDLE_BINARY_PATH/appname for iOS apps ",
"setting this to the NULL string is currently the correct thing");
In cmTarget::NormalGetLocation we added some code to over ride the default
location:
if(this->IsAppBundleOnApple())
{
this->Location += this->GetFullName(config, false);
//
// iOS binaries are not stored in contents/macos
//
const char* path_override = this->GetProperty( "MACOSX_BUNDLE_BINARY_PATH"
);
if( path_override == NULL )
{
this->Location += ".app/Contents/MacOS/";
}
else
{
this->Location += ".app/";
this->Location += path_override;
if( *path_override )
{
this->Location += "/";
}
}
}
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
2012-02-07 16:53 Michael PechnerNew Issue
======================================================================
More information about the cmake-developers
mailing list