-
Allan Sandfeld Jensen authored
Avoid checking features only available in 5.9 directly. This also changes the embedded-build configuration to being a feature that can be set at configure time. Change-Id: I9b42dcf696734a83e5c8d6e1cc07562cbeb3f993 Reviewed-by:
Michael Brüning <michael.bruning@qt.io> Reviewed-by:
Michal Klocek <michal.klocek@qt.io>
20dccb84
equals(QMAKE_HOST.os, Windows): EXE_SUFFIX = .exe
defineTest(qtConfTest_detectNinja) {
ninja = $$qtConfFindInPath("ninja$$EXE_SUFFIX")
!isEmpty(ninja) {
qtLog("Found ninja from path: $$ninja")
qtRunLoggedCommand("$$ninja --version", version)|return(false)
contains(version, "1.*"): return(true)
qtLog("Ninja version too old")
}
qtLog("Building own ninja")
return(false)
}
defineTest(qtConfTest_detectGn) {
gn = $$qtConfFindInPath("gn$$EXE_SUFFIX")
!isEmpty(gn) {
qtRunLoggedCommand("$$gn --version", version)|return(false)
#accept all for now
contains(version, ".*"): return(true)
qtLog("Gn version too old")
}
qtLog("Building own gn")
return(false)
}
defineTest(qtConfTest_embedded) {
lessThan(QT_MINOR_VERSION, 9) {
cross_compile: return(true)
return(false)
}
$$qtConfEvaluate("features.cross_compile"): return(true)
return(false)
}