diff options
Diffstat (limited to 'mkspecs/features/functions.prf')
-rw-r--r-- | mkspecs/features/functions.prf | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/mkspecs/features/functions.prf b/mkspecs/features/functions.prf index 3b9a400b1..8564bad8a 100644 --- a/mkspecs/features/functions.prf +++ b/mkspecs/features/functions.prf @@ -115,3 +115,18 @@ defineTest(skipBuild) { skipBuildReason = "$$skipBuildReason $${EOL}$$1" export(skipBuildReason) } + +defineReplace(pkgConfigHostExecutable) { + wrapper_name = $$OUT_PWD/pkg-config-host_wrapper.sh + wrapper_cmd = $$QMAKE_PKG_CONFIG_HOST + isEmpty(wrapper_cmd): wrapper_cmd = pkg-config + wrapper_content = \ + "$$LITERAL_HASH!/bin/sh" \ + "unset PKG_CONFIG_LIBDIR" \ + "unset PKG_CONFIG_SYSROOT_DIR" \ + "exec $$wrapper_cmd \"$@\"" + !build_pass:!write_file($$wrapper_name, wrapper_content, exe): error() + QMAKE_DISTCLEAN += $$wrapper_name + export(QMAKE_DISTCLEAN) + return($$system_quote($$system_path($$wrapper_name))) +} |