[Cmake-commits] CMake branch, next, updated. v2.8.3-786-ge0201a7

Brad King brad.king at kitware.com
Thu Dec 9 11:34:06 EST 2010


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  e0201a7acfc4d074b3d41a21f987eaf210984b0d (commit)
       via  3b7f9014942dc79a24c90904312af768a180ae9d (commit)
      from  dce97990d97e72766e516b7572d6fabe659d176b (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=e0201a7acfc4d074b3d41a21f987eaf210984b0d
commit e0201a7acfc4d074b3d41a21f987eaf210984b0d
Merge: dce9799 3b7f901
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 9 11:34:05 2010 -0500
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Thu Dec 9 11:34:05 2010 -0500

    Merge topic 'cross-compile-apple-host' into next
    
    3b7f901 Fix soname in cross-compiled targets with Mac host (#11547)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=3b7f9014942dc79a24c90904312af768a180ae9d
commit 3b7f9014942dc79a24c90904312af768a180ae9d
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Thu Dec 9 11:18:25 2010 -0500
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Thu Dec 9 11:18:25 2010 -0500

    Fix soname in cross-compiled targets with Mac host (#11547)
    
    The soname generation code was compile-time selected instead of runtime
    selected.  The result is that a Mac-compiled cmake used to cross-compile
    Mac -> Unix generates an soname of the form libfoo.x.y.so instead of
    libfoo.so.x.y as expected.  Instead do a runtime check based on the
    target platform.
    
    Inspired-By: George Staikos <staikos at kde.org>

diff --git a/Source/cmTarget.cxx b/Source/cmTarget.cxx
index ca61b1f..a226c40 100644
--- a/Source/cmTarget.cxx
+++ b/Source/cmTarget.cxx
@@ -3196,6 +3196,7 @@ void cmTarget::GetLibraryNames(std::string& name,
     // the library version as the soversion.
     soversion = version;
     }
+  bool isApple = this->Makefile->IsOn("APPLE");
 
   // Get the components of the library name.
   std::string prefix;
@@ -3207,26 +3208,33 @@ void cmTarget::GetLibraryNames(std::string& name,
   name = prefix+base+suffix;
 
   // The library's soname.
-#if defined(__APPLE__)
-  soName = prefix+base;
-#else
-  soName = name;
-#endif
+  if(isApple)
+    {
+    soName = prefix+base;
+    }
+  else
+    {
+    soName = name;
+    }
   if(soversion)
     {
     soName += ".";
     soName += soversion;
     }
-#if defined(__APPLE__)
-  soName += suffix;
-#endif
+  if(isApple)
+    {
+    soName += suffix;
+    }
 
   // The library's real name on disk.
-#if defined(__APPLE__)
-  realName = prefix+base;
-#else
+  if(isApple)
+    {
+    realName = prefix+base;
+    }
+  else
+    {
   realName = name;
-#endif
+    }
   if(version)
     {
     realName += ".";
@@ -3237,9 +3245,10 @@ void cmTarget::GetLibraryNames(std::string& name,
     realName += ".";
     realName += soversion;
     }
-#if defined(__APPLE__)
-  realName += suffix;
-#endif
+  if(isApple)
+    {
+    realName += suffix;
+    }
 
   // The import library name.
   if(this->GetType() == cmTarget::SHARED_LIBRARY ||

-----------------------------------------------------------------------

Summary of changes:
 Source/cmTarget.cxx |   39 ++++++++++++++++++++++++---------------
 1 files changed, 24 insertions(+), 15 deletions(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list