|
@@ -733,7 +733,7 @@ void cmTarget::UpdateLocation()
|
|
|
target_location += cfgid;
|
|
target_location += cfgid;
|
|
|
target_location += "/";
|
|
target_location += "/";
|
|
|
}
|
|
}
|
|
|
- target_location += this->GetFullName(m_Makefile);
|
|
|
|
|
|
|
+ target_location += this->GetFullName();
|
|
|
this->SetProperty("LOCATION",target_location.c_str());
|
|
this->SetProperty("LOCATION",target_location.c_str());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -927,13 +927,12 @@ const char* cmTarget::GetPrefixVariableInternal(TargetType type)
|
|
|
return "";
|
|
return "";
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-std::string cmTarget::GetFullName(cmMakefile* mf)
|
|
|
|
|
|
|
+std::string cmTarget::GetFullName()
|
|
|
{
|
|
{
|
|
|
- return this->GetFullNameInternal(mf, this->GetType());
|
|
|
|
|
|
|
+ return this->GetFullNameInternal(this->GetType());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-std::string cmTarget::GetFullNameInternal(cmMakefile* mf,
|
|
|
|
|
- TargetType type)
|
|
|
|
|
|
|
+std::string cmTarget::GetFullNameInternal(TargetType type)
|
|
|
{
|
|
{
|
|
|
const char* targetPrefix = this->GetProperty("PREFIX");
|
|
const char* targetPrefix = this->GetProperty("PREFIX");
|
|
|
const char* targetSuffix = this->GetProperty("SUFFIX");
|
|
const char* targetSuffix = this->GetProperty("SUFFIX");
|
|
@@ -945,31 +944,31 @@ std::string cmTarget::GetFullNameInternal(cmMakefile* mf,
|
|
|
const char* suffixVar = this->GetSuffixVariableInternal(type);
|
|
const char* suffixVar = this->GetSuffixVariableInternal(type);
|
|
|
const char* ll =
|
|
const char* ll =
|
|
|
this->GetLinkerLanguage(
|
|
this->GetLinkerLanguage(
|
|
|
- mf->GetLocalGenerator()->GetGlobalGenerator());
|
|
|
|
|
|
|
+ m_Makefile->GetLocalGenerator()->GetGlobalGenerator());
|
|
|
// first try language specific suffix
|
|
// first try language specific suffix
|
|
|
if(ll)
|
|
if(ll)
|
|
|
{
|
|
{
|
|
|
if(!targetSuffix && suffixVar && *suffixVar)
|
|
if(!targetSuffix && suffixVar && *suffixVar)
|
|
|
{
|
|
{
|
|
|
std::string langSuff = suffixVar + std::string("_") + ll;
|
|
std::string langSuff = suffixVar + std::string("_") + ll;
|
|
|
- targetSuffix = mf->GetDefinition(langSuff.c_str());
|
|
|
|
|
|
|
+ targetSuffix = m_Makefile->GetDefinition(langSuff.c_str());
|
|
|
}
|
|
}
|
|
|
if(!targetPrefix && prefixVar && *prefixVar)
|
|
if(!targetPrefix && prefixVar && *prefixVar)
|
|
|
{
|
|
{
|
|
|
std::string langPrefix = prefixVar + std::string("_") + ll;
|
|
std::string langPrefix = prefixVar + std::string("_") + ll;
|
|
|
- targetPrefix = mf->GetDefinition(langPrefix.c_str());
|
|
|
|
|
|
|
+ targetPrefix = m_Makefile->GetDefinition(langPrefix.c_str());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// if there is no prefix on the target use the cmake definition
|
|
// if there is no prefix on the target use the cmake definition
|
|
|
if(!targetPrefix && prefixVar)
|
|
if(!targetPrefix && prefixVar)
|
|
|
{
|
|
{
|
|
|
- targetPrefix = mf->GetSafeDefinition(prefixVar);
|
|
|
|
|
|
|
+ targetPrefix = m_Makefile->GetSafeDefinition(prefixVar);
|
|
|
}
|
|
}
|
|
|
// if there is no suffix on the target use the cmake definition
|
|
// if there is no suffix on the target use the cmake definition
|
|
|
if(!targetSuffix && suffixVar)
|
|
if(!targetSuffix && suffixVar)
|
|
|
{
|
|
{
|
|
|
- targetSuffix = mf->GetSafeDefinition(suffixVar);
|
|
|
|
|
|
|
+ targetSuffix = m_Makefile->GetSafeDefinition(suffixVar);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// Begin the final name with the prefix.
|
|
// Begin the final name with the prefix.
|
|
@@ -994,13 +993,13 @@ std::string cmTarget::GetFullNameInternal(cmMakefile* mf,
|
|
|
return name;
|
|
return name;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-std::string cmTarget::GetBaseName(cmMakefile* mf)
|
|
|
|
|
|
|
+std::string cmTarget::GetBaseName()
|
|
|
{
|
|
{
|
|
|
- return this->GetBaseNameInternal(mf, this->GetType());
|
|
|
|
|
|
|
+ return this->GetBaseNameInternal(this->GetType());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
std::string
|
|
std::string
|
|
|
-cmTarget::GetBaseNameInternal(cmMakefile* mf, TargetType type)
|
|
|
|
|
|
|
+cmTarget::GetBaseNameInternal(TargetType type)
|
|
|
{
|
|
{
|
|
|
std::string pathPrefix = "";
|
|
std::string pathPrefix = "";
|
|
|
#ifdef __APPLE__
|
|
#ifdef __APPLE__
|
|
@@ -1018,16 +1017,16 @@ cmTarget::GetBaseNameInternal(cmMakefile* mf, TargetType type)
|
|
|
// first check for a language specific suffix var
|
|
// first check for a language specific suffix var
|
|
|
const char* ll =
|
|
const char* ll =
|
|
|
this->GetLinkerLanguage(
|
|
this->GetLinkerLanguage(
|
|
|
- mf->GetLocalGenerator()->GetGlobalGenerator());
|
|
|
|
|
|
|
+ m_Makefile->GetLocalGenerator()->GetGlobalGenerator());
|
|
|
if(ll)
|
|
if(ll)
|
|
|
{
|
|
{
|
|
|
std::string langPrefix = prefixVar + std::string("_") + ll;
|
|
std::string langPrefix = prefixVar + std::string("_") + ll;
|
|
|
- targetPrefix = mf->GetDefinition(langPrefix.c_str());
|
|
|
|
|
|
|
+ targetPrefix = m_Makefile->GetDefinition(langPrefix.c_str());
|
|
|
}
|
|
}
|
|
|
// if there not a language specific suffix then use the general one
|
|
// if there not a language specific suffix then use the general one
|
|
|
if(!targetPrefix)
|
|
if(!targetPrefix)
|
|
|
{
|
|
{
|
|
|
- targetPrefix = mf->GetSafeDefinition(prefixVar);
|
|
|
|
|
|
|
+ targetPrefix = m_Makefile->GetSafeDefinition(prefixVar);
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
std::string name = pathPrefix;
|
|
std::string name = pathPrefix;
|
|
@@ -1036,21 +1035,19 @@ cmTarget::GetBaseNameInternal(cmMakefile* mf, TargetType type)
|
|
|
return name;
|
|
return name;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void cmTarget::GetLibraryNames(cmMakefile* mf,
|
|
|
|
|
- std::string& name,
|
|
|
|
|
|
|
+void cmTarget::GetLibraryNames(std::string& name,
|
|
|
std::string& soName,
|
|
std::string& soName,
|
|
|
std::string& realName,
|
|
std::string& realName,
|
|
|
std::string& baseName)
|
|
std::string& baseName)
|
|
|
{
|
|
{
|
|
|
// Get the names based on the real type of the library.
|
|
// Get the names based on the real type of the library.
|
|
|
- this->GetLibraryNamesInternal(mf, name, soName, realName, this->GetType());
|
|
|
|
|
|
|
+ this->GetLibraryNamesInternal(name, soName, realName, this->GetType());
|
|
|
|
|
|
|
|
// The library name without extension.
|
|
// The library name without extension.
|
|
|
- baseName = this->GetBaseName(mf);
|
|
|
|
|
|
|
+ baseName = this->GetBaseName();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void cmTarget::GetLibraryCleanNames(cmMakefile* mf,
|
|
|
|
|
- std::string& staticName,
|
|
|
|
|
|
|
+void cmTarget::GetLibraryCleanNames(std::string& staticName,
|
|
|
std::string& sharedName,
|
|
std::string& sharedName,
|
|
|
std::string& sharedSOName,
|
|
std::string& sharedSOName,
|
|
|
std::string& sharedRealName)
|
|
std::string& sharedRealName)
|
|
@@ -1058,7 +1055,7 @@ void cmTarget::GetLibraryCleanNames(cmMakefile* mf,
|
|
|
// Get the name as if this were a static library.
|
|
// Get the name as if this were a static library.
|
|
|
std::string soName;
|
|
std::string soName;
|
|
|
std::string realName;
|
|
std::string realName;
|
|
|
- this->GetLibraryNamesInternal(mf, staticName, soName, realName,
|
|
|
|
|
|
|
+ this->GetLibraryNamesInternal(staticName, soName, realName,
|
|
|
cmTarget::STATIC_LIBRARY);
|
|
cmTarget::STATIC_LIBRARY);
|
|
|
|
|
|
|
|
// Get the names as if this were a shared library.
|
|
// Get the names as if this were a shared library.
|
|
@@ -1069,19 +1066,18 @@ void cmTarget::GetLibraryCleanNames(cmMakefile* mf,
|
|
|
// shared library will never be present. In the latter case the
|
|
// shared library will never be present. In the latter case the
|
|
|
// type will never be MODULE. Either way the only names that
|
|
// type will never be MODULE. Either way the only names that
|
|
|
// might have to be cleaned are the shared library names.
|
|
// might have to be cleaned are the shared library names.
|
|
|
- this->GetLibraryNamesInternal(mf, sharedName, sharedSOName,
|
|
|
|
|
|
|
+ this->GetLibraryNamesInternal(sharedName, sharedSOName,
|
|
|
sharedRealName, cmTarget::SHARED_LIBRARY);
|
|
sharedRealName, cmTarget::SHARED_LIBRARY);
|
|
|
}
|
|
}
|
|
|
else
|
|
else
|
|
|
{
|
|
{
|
|
|
// Use the name of the real type of the library (shared or module).
|
|
// Use the name of the real type of the library (shared or module).
|
|
|
- this->GetLibraryNamesInternal(mf, sharedName, sharedSOName,
|
|
|
|
|
|
|
+ this->GetLibraryNamesInternal(sharedName, sharedSOName,
|
|
|
sharedRealName, this->GetType());
|
|
sharedRealName, this->GetType());
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void cmTarget::GetLibraryNamesInternal(cmMakefile* mf,
|
|
|
|
|
- std::string& name,
|
|
|
|
|
|
|
+void cmTarget::GetLibraryNamesInternal(std::string& name,
|
|
|
std::string& soName,
|
|
std::string& soName,
|
|
|
std::string& realName,
|
|
std::string& realName,
|
|
|
TargetType type)
|
|
TargetType type)
|
|
@@ -1089,7 +1085,7 @@ void cmTarget::GetLibraryNamesInternal(cmMakefile* mf,
|
|
|
// Construct the name of the soname flag variable for this language.
|
|
// Construct the name of the soname flag variable for this language.
|
|
|
const char* ll =
|
|
const char* ll =
|
|
|
this->GetLinkerLanguage(
|
|
this->GetLinkerLanguage(
|
|
|
- mf->GetLocalGenerator()->GetGlobalGenerator());
|
|
|
|
|
|
|
+ m_Makefile->GetLocalGenerator()->GetGlobalGenerator());
|
|
|
std::string sonameFlag = "CMAKE_SHARED_LIBRARY_SONAME";
|
|
std::string sonameFlag = "CMAKE_SHARED_LIBRARY_SONAME";
|
|
|
if(ll)
|
|
if(ll)
|
|
|
{
|
|
{
|
|
@@ -1102,7 +1098,7 @@ void cmTarget::GetLibraryNamesInternal(cmMakefile* mf,
|
|
|
const char* version = this->GetProperty("VERSION");
|
|
const char* version = this->GetProperty("VERSION");
|
|
|
const char* soversion = this->GetProperty("SOVERSION");
|
|
const char* soversion = this->GetProperty("SOVERSION");
|
|
|
if((type != cmTarget::SHARED_LIBRARY && type != cmTarget::MODULE_LIBRARY) ||
|
|
if((type != cmTarget::SHARED_LIBRARY && type != cmTarget::MODULE_LIBRARY) ||
|
|
|
- !mf->GetDefinition(sonameFlag.c_str()))
|
|
|
|
|
|
|
+ !m_Makefile->GetDefinition(sonameFlag.c_str()))
|
|
|
{
|
|
{
|
|
|
// Versioning is supported only for shared libraries and modules,
|
|
// Versioning is supported only for shared libraries and modules,
|
|
|
// and then only when the platform supports an soname flag.
|
|
// and then only when the platform supports an soname flag.
|
|
@@ -1117,7 +1113,7 @@ void cmTarget::GetLibraryNamesInternal(cmMakefile* mf,
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
// The library name.
|
|
// The library name.
|
|
|
- name = this->GetFullNameInternal(mf, type);
|
|
|
|
|
|
|
+ name = this->GetFullNameInternal(type);
|
|
|
|
|
|
|
|
// The library's soname.
|
|
// The library's soname.
|
|
|
soName = name;
|
|
soName = name;
|
|
@@ -1141,24 +1137,21 @@ void cmTarget::GetLibraryNamesInternal(cmMakefile* mf,
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void cmTarget::GetExecutableNames(cmMakefile* mf,
|
|
|
|
|
- std::string& name,
|
|
|
|
|
|
|
+void cmTarget::GetExecutableNames(std::string& name,
|
|
|
std::string& realName)
|
|
std::string& realName)
|
|
|
{
|
|
{
|
|
|
// Get the names based on the real type of the executable.
|
|
// Get the names based on the real type of the executable.
|
|
|
- this->GetExecutableNamesInternal(mf, name, realName, this->GetType());
|
|
|
|
|
|
|
+ this->GetExecutableNamesInternal(name, realName, this->GetType());
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void cmTarget::GetExecutableCleanNames(cmMakefile* mf,
|
|
|
|
|
- std::string& name,
|
|
|
|
|
|
|
+void cmTarget::GetExecutableCleanNames(std::string& name,
|
|
|
std::string& realName)
|
|
std::string& realName)
|
|
|
{
|
|
{
|
|
|
// Get the name and versioned name of this executable.
|
|
// Get the name and versioned name of this executable.
|
|
|
- this->GetExecutableNamesInternal(mf, name, realName, cmTarget::EXECUTABLE);
|
|
|
|
|
|
|
+ this->GetExecutableNamesInternal(name, realName, cmTarget::EXECUTABLE);
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
-void cmTarget::GetExecutableNamesInternal(cmMakefile* mf,
|
|
|
|
|
- std::string& name,
|
|
|
|
|
|
|
+void cmTarget::GetExecutableNamesInternal(std::string& name,
|
|
|
std::string& realName,
|
|
std::string& realName,
|
|
|
TargetType type)
|
|
TargetType type)
|
|
|
{
|
|
{
|
|
@@ -1176,7 +1169,7 @@ void cmTarget::GetExecutableNamesInternal(cmMakefile* mf,
|
|
|
#endif
|
|
#endif
|
|
|
|
|
|
|
|
// The executable name.
|
|
// The executable name.
|
|
|
- name = this->GetFullNameInternal(mf, type);
|
|
|
|
|
|
|
+ name = this->GetFullNameInternal(type);
|
|
|
|
|
|
|
|
// The executable's real name on disk.
|
|
// The executable's real name on disk.
|
|
|
realName = name;
|
|
realName = name;
|