From f6eaa469aa684f1388a414bd27248de8ad1c4569 Mon Sep 17 00:00:00 2001 From: Mat Sutcliffe Date: Thu, 8 Apr 2021 16:29:09 +0100 Subject: [PATCH] [xswiftbus] Workaround for shortcoming of qmake INSTALLS wildcard expansion When using wildcards in the `files` member of an `INSTALLS` variable, the files must exist when qmake is run or the wildcards won't be expanded. The libevent and libpng libraries are copied to `$$DestRoot/lib` as a post-build step in `blackmisc.pro`, so I work around with a shell command. --- src/xswiftbus/xswiftbus.pro | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/xswiftbus/xswiftbus.pro b/src/xswiftbus/xswiftbus.pro index 2277f31e8..9f9e391ca 100644 --- a/src/xswiftbus/xswiftbus.pro +++ b/src/xswiftbus/xswiftbus.pro @@ -159,8 +159,10 @@ win32 { QMAKE_EXTRA_TARGETS += fix_plugin_rpath } else:unix: { - dep_target.files *= $$DestRoot/lib/libevent_core-*.so.* - dep_target.files *= $$DestRoot/lib/libpng*.so.* + # Want to use wildcards in dep_target.files, but wildcard expansion happens too early, before the files exist. + dep_target.extra += $(QINSTALL) $$DestRoot/lib/libevent_core-*.so.* $$dep_target.path/`basename $$DestRoot/lib/libevent_core-*.so.*` + dep_target.extra += && + dep_target.extra += $(QINSTALL) $$DestRoot/lib/libpng*.so.* $$dep_target.path/`basename $$DestRoot/lib/libpng*.so.*` legacy_data_target.path = $$PREFIX/xswiftbus legacy_data_target.files *= LegacyData