aboutsummaryrefslogtreecommitdiff
path: root/src/GlobalLib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/GlobalLib.cpp')
-rw-r--r--src/GlobalLib.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/GlobalLib.cpp b/src/GlobalLib.cpp
index 177f1b9..203cd0f 100644
--- a/src/GlobalLib.cpp
+++ b/src/GlobalLib.cpp
@@ -136,11 +136,19 @@ namespace sibs
if(ninja.getSourceFiles().empty())
{
- return Result<string>::Ok("");
+ return Result<string>::Ok("No source files in dependency (header only library?)");
}
else
{
- string debugBuildPath = packageDir + "/build/debug";
+ string debugBuildPath = packageDir + "/sibs-build/debug";
+ string staticLibPath = debugBuildPath;
+ staticLibPath += "/lib";
+ staticLibPath += name;
+ staticLibPath += ".a";
+ linkerFlagCallbackFunc(staticLibPath);
+
+ // TODO: Use different directories depending on the project type, but .o build files should be in the same directory
+ // no matter what project type, since they are used for executables, static/dynamic libraries
Result<bool> createBuildDirResult = createDirectoryRecursive(debugBuildPath.c_str());
if(createBuildDirResult.isErr())
return Result<string>::Err(createBuildDirResult);
@@ -153,11 +161,6 @@ namespace sibs
if (buildResult.isErr())
return Result<string>::Err(buildResult.getErrMsg());
- string staticLibPath = debugBuildPath;
- staticLibPath += "/lib";
- staticLibPath += name;
- staticLibPath += ".a";
- linkerFlagCallbackFunc(staticLibPath);
return Result<string>::Ok(staticLibPath);
}
}