summaryrefslogtreecommitdiffstats
path: root/Source/cmTarget.cxx
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2006-06-05 17:45:43 (GMT)
committerBrad King <brad.king@kitware.com>2006-06-05 17:45:43 (GMT)
commit932e3524fc2d8ae331de5770540e9b463be8d76e (patch)
treea16aa4e87e8dfe6548c079080bb9a18cc4674372 /Source/cmTarget.cxx
parent7ebe4702db28d09cacca0b958c81ce2c3659699b (diff)
downloadCMake-932e3524fc2d8ae331de5770540e9b463be8d76e.zip
CMake-932e3524fc2d8ae331de5770540e9b463be8d76e.tar.gz
CMake-932e3524fc2d8ae331de5770540e9b463be8d76e.tar.bz2
ENH: Changing shared library versioned file names on OSX to conform to that platform's convention.
Diffstat (limited to 'Source/cmTarget.cxx')
-rw-r--r--Source/cmTarget.cxx22
1 files changed, 21 insertions, 1 deletions
diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index 1c88eb7..5f0998a 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -1321,19 +1321,36 @@ void cmTarget::GetLibraryNamesInternal(std::string& name,
soversion = version;
}
+ // Get the components of the library name.
+ std::string prefix;
+ std::string base;
+ std::string suffix;
+ this->GetFullNameInternal(type, config, false, prefix, base, suffix);
+
// The library name.
- name = this->GetFullNameInternal(type, config, false);
+ name = prefix+base+suffix;
// The library's soname.
+#if defined(__APPLE__)
+ soName = prefix+base;
+#else
soName = name;
+#endif
if(soversion)
{
soName += ".";
soName += soversion;
}
+#if defined(__APPLE__)
+ soName += suffix;
+#endif
// The library's real name on disk.
+#if defined(__APPLE__)
+ realName = prefix+base;
+#else
realName = name;
+#endif
if(version)
{
realName += ".";
@@ -1344,6 +1361,9 @@ void cmTarget::GetLibraryNamesInternal(std::string& name,
realName += ".";
realName += soversion;
}
+#if defined(__APPLE__)
+ realName += suffix;
+#endif
// The import library name.
if(type == cmTarget::SHARED_LIBRARY)