[PATCH 1/4] subsurface-configure.pri: pkg-config detection change

Lubomir I. Ivanov neolit123 at gmail.com
Wed Oct 9 15:18:48 UTC 2013


From: "Lubomir I. Ivanov" <neolit123 at gmail.com>

This is a small change, but it seems to work as expected on both
Linux and Win32. What happens if 2> NUL > NUL is used on Win32
for cmd.exe is that the output of both stdout and stderr seems
to pipe into NUL and pkg-config is always reported as missing.

Signed-off-by: Lubomir I. Ivanov <neolit123 at gmail.com>
---
 subsurface-configure.pri | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/subsurface-configure.pri b/subsurface-configure.pri
index c06d1c1..903d6a8 100644
--- a/subsurface-configure.pri
+++ b/subsurface-configure.pri
@@ -28,7 +28,8 @@ CONFIG += exceptions_off
 # Check if we have pkg-config
 equals($$QMAKE_HOST.os, "Windows"):NUL=NUL
 else:NUL=/dev/null
-system(pkg-config --version 2>$$NUL >$$NUL) {
+PKG_CONFIG_OUT = $$system(pkg-config --version 2> $$NUL)
+!isEmpty(PKG_CONFIG_OUT) {
     CONFIG += link_pkgconfig
 } else {
     message("pkg-config not found, no detection performed. See README for details")
-- 
1.7.11.msysgit.0



More information about the subsurface mailing list