summaryrefslogtreecommitdiffstats
path: root/Source/cmGlobalGenerator.h
diff options
context:
space:
mode:
authorMarc Chevrier <marc.chevrier@gmail.com>2023-05-21 12:26:08 (GMT)
committerMarc Chevrier <marc.chevrier@gmail.com>2023-05-21 12:26:08 (GMT)
commit5884303e692b342ad444c5ab01caf7c219e735af (patch)
tree4d788ac62da34442b8085eda62a99a533f0a65f7 /Source/cmGlobalGenerator.h
parentf32e275f2993f13e7a9c59bdcc5e1942b23a228d (diff)
downloadCMake-5884303e692b342ad444c5ab01caf7c219e735af.zip
CMake-5884303e692b342ad444c5ab01caf7c219e735af.tar.gz
CMake-5884303e692b342ad444c5ab01caf7c219e735af.tar.bz2
Apple Framework: enhance path parsing
Diffstat (limited to 'Source/cmGlobalGenerator.h')
-rw-r--r--Source/cmGlobalGenerator.h26
1 files changed, 24 insertions, 2 deletions
diff --git a/Source/cmGlobalGenerator.h b/Source/cmGlobalGenerator.h
index 79fe52c..d657fc8 100644
--- a/Source/cmGlobalGenerator.h
+++ b/Source/cmGlobalGenerator.h
@@ -384,9 +384,17 @@ public:
, Name(std::move(name))
{
}
- FrameworkDescriptor(std::string directory, std::string name,
- std::string suffix)
+ FrameworkDescriptor(std::string directory, std::string version,
+ std::string name)
: Directory(std::move(directory))
+ , Version(std::move(version))
+ , Name(std::move(name))
+ {
+ }
+ FrameworkDescriptor(std::string directory, std::string version,
+ std::string name, std::string suffix)
+ : Directory(std::move(directory))
+ , Version(std::move(version))
, Name(std::move(name))
, Suffix(std::move(suffix))
{
@@ -400,6 +408,13 @@ public:
{
return cmStrCat(this->Name, ".framework/"_s, this->Name, this->Suffix);
}
+ std::string GetVersionedName() const
+ {
+ return this->Version.empty()
+ ? this->GetFullName()
+ : cmStrCat(this->Name, ".framework/Versions/"_s, this->Version, '/',
+ this->Name, this->Suffix);
+ }
std::string GetFrameworkPath() const
{
return this->Directory.empty()
@@ -412,8 +427,15 @@ public:
? this->GetFullName()
: cmStrCat(this->Directory, '/', this->GetFullName());
}
+ std::string GetVersionedPath() const
+ {
+ return this->Directory.empty()
+ ? this->GetVersionedName()
+ : cmStrCat(this->Directory, '/', this->GetVersionedName());
+ }
const std::string Directory;
+ const std::string Version;
const std::string Name;
const std::string Suffix;
};