diff --git a/src/main.cpp b/src/main.cpp index 5076d6a..adcbf1e 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -37,6 +37,7 @@ int main(const int argc, const char *const *const argv) { args::HelpFlag help(parser, "help", "Display this help text", {'h', "help"}); args::ValueFlag appDirPath(parser, "appdir path", "Path to an existing AppDir", {"appdir"}); + args::ValueFlagList excludeLibraryPatterns(parser, "pattern", "Shared library to exclude from deployment (glob pattern)", {"exclude-library"}); args::ValueFlagList extraPlugins(parser, "plugin", "Extra Qt plugin to deploy (specified by name, filename or path)", {'p', "extra-plugin"}); @@ -135,6 +136,9 @@ int main(const int argc, const char *const *const argv) { ldLog() << std::endl << "Using Qt version: " << qtVersion << " (" << qtMajorVersion << ")" << std::endl; appdir::AppDir appDir(appDirPath.Get()); + if (const auto patterns = excludeLibraryPatterns.Get(); !patterns.empty()) { + appDir.setExcludeLibraryPatterns(patterns); + } // allow disabling copyright files deployment via environment variable if (getenv("DISABLE_COPYRIGHT_FILES_DEPLOYMENT") != nullptr) {