commit ebb858443cef50e579fd266152016b952d1787fd
parent 24b01d660a6b1ff5fbc989e0739c6c24c18733e6
Author: Alexandre BIQUE <bique.alexandre@gmail.com>
Date: Thu, 2 Sep 2021 15:43:39 +0200
Make the path detection more flexible
Diffstat:
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/examples/plugins/path-provider.cc b/examples/plugins/path-provider.cc
@@ -39,7 +39,7 @@ namespace clap {
: srcRoot_(computeSrcRoot(pluginPath)), buildRoot_(computeBuildRoot(pluginPath)), pluginName_(pluginName) {}
static std::string computeSrcRoot(const std::string &pluginPath) {
- static const std::regex r("(/.*)/cmake-builds/.*$", std::regex::optimize);
+ static const std::regex r("(/.*)/.*build.*/.*$", std::regex::optimize);
std::smatch m;
if (!std::regex_match(pluginPath, m, r))
@@ -48,7 +48,7 @@ namespace clap {
}
static std::string computeBuildRoot(const std::string &pluginPath) {
- static const std::regex r("(/.*/cmake-builds/.*)/examples/plugins/.*\\.clap$",
+ static const std::regex r("(/.*/.*build.*(/.*)?)/examples/plugins/.*\\.clap$",
std::regex::optimize);
std::smatch m;