diff options
author | dec05eba <dec05eba@protonmail.com> | 2018-01-06 10:18:16 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2018-01-06 10:19:37 +0100 |
commit | 9bf72ceea8d924492aac5969c14650517849658b (patch) | |
tree | a8a8b279af8ab99b27677f5d3e99c108bb5b008b /backend | |
parent | ad3b5099263e5977d1de9bfcff715a92009e8355 (diff) |
Fix dynamic lib dependencies in packages with no source files
Packages with no source files do not output a library
that is included by dependencies, so we need to give our dependencies
to the dependant package
Diffstat (limited to 'backend')
-rw-r--r-- | backend/ninja/Ninja.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index 9dd3ecc..7c1de91 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -378,12 +378,15 @@ namespace backend }; } - // TODO: If project contains no source files, then we shouldn't override this function - dynamicLinkerFlagCallback = [&allLinkerFlags](const string &linkerFlag) + // TODO: Do same for cmake + if (!sourceFiles.empty()) { - allLinkerFlags += " "; - allLinkerFlags += linkerFlag; - }; + dynamicLinkerFlagCallback = [&allLinkerFlags](const string &linkerFlag) + { + allLinkerFlags += " "; + allLinkerFlags += linkerFlag; + }; + } string cflags; auto cflagsCallbackFunc = [&cflags](const string &dependencyCflags) |