BUG: A per-config target name postfix should be ignored for Mac bundle and framework names.

This commit is contained in:
Brad King 2008-04-14 15:27:27 -04:00
parent 820901dd13
commit 629afe07ce
2 changed files with 9 additions and 2 deletions

View File

@ -134,8 +134,8 @@ void cmTarget::DefineProperties(cmake *cm)
("DEBUG_POSTFIX", cmProperty::TARGET,
"A postfix that will be applied to this target when build debug.",
"A property on a target that specifies a postfix to add to the "
"target name when built in debug mode. For example foo.dll "
"versus fooD.dll");
"target name when built in debug mode. For example \"foo.dll\" "
"versus \"fooD.dll\". Ignored for Mac Frameworks and App Bundles.");
cm->DefineProperty
("EchoString", cmProperty::TARGET,
@ -2311,6 +2311,12 @@ void cmTarget::GetFullNameInternal(TargetType type,
std::string configProp = cmSystemTools::UpperCase(config);
configProp += "_POSTFIX";
configPostfix = this->GetProperty(configProp.c_str());
// Mac application bundles and frameworks have no postfix.
if(configPostfix &&
(this->IsAppBundleOnApple() || this->IsFrameworkOnApple()))
{
configPostfix = 0;
}
}
const char* prefixVar = this->GetPrefixVariableInternal(type, implib);
const char* suffixVar = this->GetSuffixVariableInternal(type, implib);

View File

@ -24,6 +24,7 @@ set_target_properties(foo PROPERTIES
PUBLIC_HEADER "foo.h;foo2.h;fooPublic.h;fooBoth.h"
RESOURCE "test.lua"
INSTALL_NAME_DIR "@executable_path/../../../Library/Frameworks"
DEBUG_POSTFIX -d
)
# fooBoth.h is listed as both public and private... (private wins...)
# fooNeither.h is listed as neither public nor private...