Merge topic 'cross-compile-apple-host'
3b7f901 Fix soname in cross-compiled targets with Mac host (#11547)
This commit is contained in:
commit
f1adcefdf4
@ -3205,6 +3205,7 @@ void cmTarget::GetLibraryNames(std::string& name,
|
|||||||
// the library version as the soversion.
|
// the library version as the soversion.
|
||||||
soversion = version;
|
soversion = version;
|
||||||
}
|
}
|
||||||
|
bool isApple = this->Makefile->IsOn("APPLE");
|
||||||
|
|
||||||
// Get the components of the library name.
|
// Get the components of the library name.
|
||||||
std::string prefix;
|
std::string prefix;
|
||||||
@ -3216,26 +3217,33 @@ void cmTarget::GetLibraryNames(std::string& name,
|
|||||||
name = prefix+base+suffix;
|
name = prefix+base+suffix;
|
||||||
|
|
||||||
// The library's soname.
|
// The library's soname.
|
||||||
#if defined(__APPLE__)
|
if(isApple)
|
||||||
soName = prefix+base;
|
{
|
||||||
#else
|
soName = prefix+base;
|
||||||
soName = name;
|
}
|
||||||
#endif
|
else
|
||||||
|
{
|
||||||
|
soName = name;
|
||||||
|
}
|
||||||
if(soversion)
|
if(soversion)
|
||||||
{
|
{
|
||||||
soName += ".";
|
soName += ".";
|
||||||
soName += soversion;
|
soName += soversion;
|
||||||
}
|
}
|
||||||
#if defined(__APPLE__)
|
if(isApple)
|
||||||
soName += suffix;
|
{
|
||||||
#endif
|
soName += suffix;
|
||||||
|
}
|
||||||
|
|
||||||
// The library's real name on disk.
|
// The library's real name on disk.
|
||||||
#if defined(__APPLE__)
|
if(isApple)
|
||||||
realName = prefix+base;
|
{
|
||||||
#else
|
realName = prefix+base;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
realName = name;
|
realName = name;
|
||||||
#endif
|
}
|
||||||
if(version)
|
if(version)
|
||||||
{
|
{
|
||||||
realName += ".";
|
realName += ".";
|
||||||
@ -3246,9 +3254,10 @@ void cmTarget::GetLibraryNames(std::string& name,
|
|||||||
realName += ".";
|
realName += ".";
|
||||||
realName += soversion;
|
realName += soversion;
|
||||||
}
|
}
|
||||||
#if defined(__APPLE__)
|
if(isApple)
|
||||||
realName += suffix;
|
{
|
||||||
#endif
|
realName += suffix;
|
||||||
|
}
|
||||||
|
|
||||||
// The import library name.
|
// The import library name.
|
||||||
if(this->GetType() == cmTarget::SHARED_LIBRARY ||
|
if(this->GetType() == cmTarget::SHARED_LIBRARY ||
|
||||||
|
Loading…
x
Reference in New Issue
Block a user