--- Modules/Platform/Linux.cmake 20 Apr 2006 14:23:17 -0000 1.9 +++ Modules/Platform/Linux.cmake 1 Aug 2006 19:36:49 -0000 1.10 @@ -7,4 +7,5 @@ SET(CMAKE_SHARED_LIBRARY_RUNTIME_C_FLAG_SEP ":") SET(CMAKE_SHARED_LIBRARY_SONAME_C_FLAG "-Wl,-soname,") SET(CMAKE_SHARED_LIBRARY_SONAME_CXX_FLAG "-Wl,-soname,") +SET(CMAKE_SHARED_LIBRARY_SONAME_Fortran_FLAG "-Wl,-soname,") INCLUDE(Platform/UnixPaths) --- Source/cmInstallTargetGenerator.cxx 30 Jun 2006 17:48:43 -0000 1.12.2.3 +++ Source/cmInstallTargetGenerator.cxx 1 Aug 2006 19:36:49 -0000 1.17 @@ -3,8 +3,8 @@ Program: CMake - Cross-Platform Makefile Generator Module: $RCSfile: cmInstallTargetGenerator.cxx,v $ Language: C++ - Date: $Date: 2006/06/30 17:48:43 $ - Version: $Revision: 1.12.2.3 $ + Date: $Date: 2006/08/01 19:36:49 $ + Version: $Revision: 1.17 $ Copyright (c) 2002 Kitware, Inc., Insight Consortium. All rights reserved. See Copyright.txt or http://www.cmake.org/HTML/Copyright.html for details. @@ -81,16 +81,25 @@ { // Add shared library installation properties if this platform // supports them. - const char* lib_version = this->Target->GetProperty("VERSION"); - const char* lib_soversion = this->Target->GetProperty("SOVERSION"); - if(!this->Target->GetMakefile() - ->GetDefinition("CMAKE_SHARED_LIBRARY_SONAME_C_FLAG")) + const char* lib_version = 0; + const char* lib_soversion = 0; + + // Versioning is supported only for shared libraries and modules, + // and then only when the platform supports an soname flag. + cmGlobalGenerator* gg = + this->Target->GetMakefile()->GetLocalGenerator()->GetGlobalGenerator(); + if(const char* linkLanguage = this->Target->GetLinkerLanguage(gg)) { - // Versioning is supported only for shared libraries and modules, - // and then only when the platform supports an soname flag. - lib_version = 0; - lib_soversion = 0; + std::string sonameFlagVar = "CMAKE_SHARED_LIBRARY_SONAME_"; + sonameFlagVar += linkLanguage; + sonameFlagVar += "_FLAG"; + if(this->Target->GetMakefile()->GetDefinition(sonameFlagVar.c_str())) + { + lib_version = this->Target->GetProperty("VERSION"); + lib_soversion = this->Target->GetProperty("SOVERSION"); + } } + if(lib_version) { props += " VERSION "; @@ -272,7 +281,7 @@ //---------------------------------------------------------------------------- void cmInstallTargetGenerator ::AddInstallNamePatchRule(std::ostream& os, - const char* destination) + const char* destination) { // Build a map of build-tree install_name to install-tree install_name for // shared libraries linked to this target.