From 4ff62aec5727ea8f0ae8e9771dc72d977df98d70 Mon Sep 17 00:00:00 2001 From: Allan Sandfeld Jensen Date: Mon, 22 Jun 2020 11:36:46 +0200 Subject: Detect the presence of host node.js Allows building with or without it. Fixes: QTBUG-83729 Change-Id: I88d784e3230208e1268491c6ae0a4ebf1543aac8 Reviewed-by: Michal Klocek --- configure.pri | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configure.pri') diff --git a/configure.pri b/configure.pri index 9c7687eea..d3ba9b147 100644 --- a/configure.pri +++ b/configure.pri @@ -191,6 +191,19 @@ defineTest(qtConfTest_detectGn) { return(false) } +defineTest(qtConfTest_detectNodeJS) { + nodejs = $$qtConfFindInPath("nodejs$$EXE_SUFFIX") + isEmpty(nodejs) { + qtLog("'nodejs$$EXE_SUFFIX' not found in PATH. Checking for 'node$$EXE_SUFFIX'.") + nodejs = $$qtConfFindInPath("node$$EXE_SUFFIX") + isEmpty(nodejs) { + qtLog("'node$$EXE_SUFFIX' not found in PATH. Giving up.") + return(false) + } + } + return(true) +} + defineTest(qtConfTest_detectEmbedded) { lessThan(QT_MINOR_VERSION, 9) { cross_compile: return(true) -- cgit v1.2.3