Skip to content

Commit

Permalink
qt_host_path sanity checks
Browse files Browse the repository at this point in the history
  • Loading branch information
martinburchell committed Jul 22, 2023
1 parent 2a36d16 commit ec4e3d0
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions tablet_qt/tools/build_qt.py
Original file line number Diff line number Diff line change
Expand Up @@ -402,7 +402,7 @@
import multiprocessing
import os
from os import chdir
from os.path import expanduser, isfile, join, split
from os.path import expanduser, isdir, isfile, join, split
import platform
import re
import shutil
Expand Down Expand Up @@ -3515,7 +3515,14 @@ def build_qt(cfg: Config, target_platform: Platform) -> str:
# or
# /Users/me/Qt/<version>/macos
# for pre-installed Qt
# TODO: Add sanity checks here, must exist and have bin/qmake

# CMake won't warn us if this isn't a valid path
if not isdir(cfg.qt_host_path):
fail(f"qt_host_path {cfg.qt_host_path} is not a valid directory")

if not isdir(os.path.join(cfg.qt_host_path, "bin", "qmake")):
fail(f"qt_host_path {cfg.qt_host_path} does not contain bin/qmake")

qt_config_cmake_args.append(f"-DQT_HOST_PATH={cfg.qt_host_path}")

for objdir in objdirs:
Expand Down

0 comments on commit ec4e3d0

Please sign in to comment.