update scons qt tool (#27825)

* update scons qt tool

* support old and new

---------

Co-authored-by: Comma Device <device@comma.ai>
old-commit-hash: 558da046dbc4e865fef7358d3cd737f77be925e0
This commit is contained in:
Adeeb Shihadeh
2023-04-06 20:42:19 -07:00
committed by GitHub
parent 1db81fb496
commit e51fa7d1a3

View File

@@ -5,6 +5,8 @@ import sysconfig
import platform
import numpy as np
import SCons.Errors
TICI = os.path.isfile('/TICI')
AGNOS = TICI
@@ -311,7 +313,11 @@ else:
elif arch != "Darwin":
qt_libs += ["GL"]
qt_env.Tool('qt')
try:
qt_env.Tool('qt3')
except SCons.Errors.UserError:
qt_env.Tool('qt')
qt_env['CPPPATH'] += qt_dirs + ["#selfdrive/ui/qt/"]
qt_flags = [
"-D_REENTRANT",