diff options
author | Daniel Schürmann <daschuer@mixxx.org> | 2015-10-06 21:11:11 +0200 |
---|---|---|
committer | Daniel Schürmann <daschuer@mixxx.org> | 2015-10-06 21:11:11 +0200 |
commit | 17a2b396c02e9b6e937e1e8a3cd8b8dcadebe81f (patch) | |
tree | 1d49aaa733816de93979c2df1331d01e5d80a62d /build/mixxx.py | |
parent | cae86a3f9e41268f24772d984a2ec1ae34403661 (diff) | |
parent | 3038651b159e75e5073ea417a58e587507839e16 (diff) |
Merge commit '3038651b159e75e5073ea417a58e587507839e16'
Diffstat (limited to 'build/mixxx.py')
-rw-r--r-- | build/mixxx.py | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/build/mixxx.py b/build/mixxx.py index de60d816df..89fdc8e9f7 100644 --- a/build/mixxx.py +++ b/build/mixxx.py @@ -147,12 +147,21 @@ class MixxxBuild(object): default_qtdir = depends.Qt.DEFAULT_QT4DIRS.get(self.platform, '') tools.append('protoc') + # Try fallback to pkg-config on Linux + if not os.path.isdir(default_qtdir) and self.platform == 'linux': + if any(os.access(os.path.join(path, 'pkg-config'), os.X_OK) for path in os.environ["PATH"].split(os.pathsep)): + import subprocess + try: + default_qtdir = subprocess.Popen(["pkg-config", "--variable=includedir", "Qt5Core"], stdout = subprocess.PIPE).communicate()[0].rstrip() + finally: + pass + # Ugly hack to check the qtdir argument qtdir = Script.ARGUMENTS.get('qtdir', os.environ.get('QTDIR', default_qtdir)) # Validate the specified qtdir exists - if not os.path.exists(qtdir): + if not os.path.isdir(qtdir): logging.error("QT path does not exist or QT4 is not installed.") logging.error( "Please specify your QT path by running 'scons qtdir=[path]'") |