From 032b14d6eef98754d9c1e6ae23dfca0087f3089c Mon Sep 17 00:00:00 2001 From: Zhihong Zhang Date: Thu, 30 May 2024 13:43:51 -0400 Subject: [PATCH] Added support for multiple plugins in a single lib --- src/processing/processor_loader.cc | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/processing/processor_loader.cc b/src/processing/processor_loader.cc index 00bb49d03cbe..3422e07d4a04 100644 --- a/src/processing/processor_loader.cc +++ b/src/processing/processor_loader.cc @@ -22,7 +22,17 @@ namespace processing { return new MockProcessor(); } - auto lib_name = "libproc_" + plugin_name; + // The plugin name may contain a colon + std::string::size_type pos = plugin_name.find(':'); + std::string lib_suffix; + if (pos != std::string::npos) { + lib_suffix = plugin_name.substr(0, pos); + } + else { + lib_suffix = plugin_name; + } + + auto lib_name = "libproc_" + lib_suffix; auto extension = #if defined(_WIN32) || defined(_WIN64)