aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2017-12-10 04:05:20 +0100
committerdec05eba <dec05eba@protonmail.com>2017-12-10 04:06:02 +0100
commit99570d3fa5abf548d4e8e5e479d82ee66898b602 (patch)
treed52ac6662d51baccde2983639de0ffda3acc9578 /src
parent1d3e221a7a20bfd03517e3ae1e35e4a309a69b6a (diff)
Add support for recursive global lib dependencies
Diffstat (limited to 'src')
-rw-r--r--src/GlobalLib.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/GlobalLib.cpp b/src/GlobalLib.cpp
index 0ed34c7..41e26c1 100644
--- a/src/GlobalLib.cpp
+++ b/src/GlobalLib.cpp
@@ -53,7 +53,7 @@ namespace sibs
return false;
}
- Result<string> GlobalLib::getDynamicLibsLinkerFlags(const string &globalLibRootDir, const string &name, const string &version)
+ Result<string> GlobalLib::getStaticLibsLinkerFlags(const string &globalLibRootDir, const string &name, const string &version, LinkerFlagCallbackFunc linkerFlagCallbackFunc)
{
Result<bool> packageExistsResult = validatePackageExists(globalLibRootDir, name);
if(packageExistsResult.isErr())
@@ -126,7 +126,7 @@ namespace sibs
// TODO: Create build path if it doesn't exist
string debugBuildPath = packageDir + "/build/debug";
- Result<bool> buildFileResult = ninja.createBuildFile(sibsConfig.getPackageName(), sibsConfig.getDependencies(), debugBuildPath.c_str());
+ Result<bool> buildFileResult = ninja.createBuildFile(sibsConfig.getPackageName(), sibsConfig.getDependencies(), debugBuildPath.c_str(), linkerFlagCallbackFunc);
if(buildFileResult.isErr())
return Result<string>::Err(buildFileResult.getErrMsg());
@@ -138,6 +138,7 @@ namespace sibs
staticLibPath += "/lib";
staticLibPath += name;
staticLibPath += ".a";
+ linkerFlagCallbackFunc(staticLibPath);
return Result<string>::Ok(staticLibPath);
}
} \ No newline at end of file