aboutsummaryrefslogtreecommitdiff
path: root/src/GlobalLib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GlobalLib.cpp')
-rw-r--r--src/GlobalLib.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/GlobalLib.cpp b/src/GlobalLib.cpp
index 7f9d949..5c0e16d 100644
--- a/src/GlobalLib.cpp
+++ b/src/GlobalLib.cpp
@@ -102,7 +102,7 @@ namespace sibs
// TODO: If return error is invalid url, then the message should be converted to
// invalid package name/version. A check should be done if it is the name or version
// that is invalid.
- Result<bool> downloadDependencyResult = GlobalLib::downloadDependency(gitDependency);
+ Result<bool> downloadDependencyResult = GlobalLib::downloadDependency(gitDependency, parentConfig.platform);
if(!downloadDependencyResult)
return downloadDependencyResult;
@@ -276,6 +276,8 @@ namespace sibs
return Result<bool>::Err(libPathResult);
FileString libPath = libPathResult.unwrap();
libPath += TINYDIR_STRING("/.cache/sibs/lib/");
+ libPath += toFileString(asString(platform));
+ libPath += TINYDIR_STRING("/");
libPath += toFileString(dependency->name);
libPath += TINYDIR_STRING("/");
libPath += toFileString(package.version.toString());
@@ -308,13 +310,15 @@ namespace sibs
return archiveExtractResult;
}
- Result<bool> GlobalLib::downloadDependency(GitDependency *dependency)
+ Result<bool> GlobalLib::downloadDependency(GitDependency *dependency, Platform platform)
{
Result<FileString> libPathResult = getHomeDir();
if (!libPathResult)
return Result<bool>::Err(libPathResult);
FileString libPath = libPathResult.unwrap();
libPath += TINYDIR_STRING("/.cache/sibs/lib/");
+ libPath += toFileString(asString(platform));
+ libPath += TINYDIR_STRING("/");
libPath += toFileString(dependency->name);
// We dont care if the directory already exists. Nothing will happen if it does