diff options
-rw-r--r-- | backend/ninja/Ninja.cpp | 4 | ||||
-rw-r--r-- | src/CmakeModule.cpp | 4 |
2 files changed, 6 insertions, 2 deletions
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp index b21ea60..e6ca47a 100644 --- a/backend/ninja/Ninja.cpp +++ b/backend/ninja/Ninja.cpp @@ -445,8 +445,10 @@ namespace backend auto parentProjDynamicLinkerFlagCallbackFunc = dynamicLinkerFlagCallback; if(!dynamicLinkerFlagCallback || libraryType != LibraryType::STATIC) { - dynamicLinkerFlagCallback = [&linkerFlags](const string &linkerFlag) + dynamicLinkerFlagCallback = [&linkerFlags, &parentProjDynamicLinkerFlagCallbackFunc](const string &linkerFlag) { + if(parentProjDynamicLinkerFlagCallbackFunc) + parentProjDynamicLinkerFlagCallbackFunc(linkerFlag); linkerFlags.push_back(linkerFlag); }; } diff --git a/src/CmakeModule.cpp b/src/CmakeModule.cpp index cdc03eb..c512f87 100644 --- a/src/CmakeModule.cpp +++ b/src/CmakeModule.cpp @@ -56,8 +56,10 @@ namespace sibs // TODO: If project contains no source files, then we shouldn't override this function... why? if(!dynamicLinkerFlagCallbackFunc || config.getPackageType() != PackageType::STATIC) { - dynamicLinkerFlagCallbackFunc = [&linkerFlags](const string &linkerFlag) + dynamicLinkerFlagCallbackFunc = [&linkerFlags, &parentProjDynamicLinkerFlagCallbackFunc](const string &linkerFlag) { + if(parentProjDynamicLinkerFlagCallbackFunc) + parentProjDynamicLinkerFlagCallbackFunc(linkerFlag); linkerFlags.push_back(linkerFlag); }; } |