From 90eee08b3e672573e3ad93470d844e1d498651dd Mon Sep 17 00:00:00 2001 From: Lars Knoll Date: Sat, 11 Jun 2016 22:49:01 +0200 Subject: Let qmake do most of the work of configuring Qt Command line arguments, configure tests and features are now defined in a json file and a configure.pri containing some custom functions. qmake uses the json file to determine command line arguments, tests and features to be executed at configuration time. A new qt_configure.prf contains all the infrastructure to parse the command line, run the configure tests, determine the set of available features and create a report about it. Change-Id: If30ac089dd3e9f8c67ebd642bde10cfa960893bb Reviewed-by: Oswald Buddenhagen --- mkspecs/features/configure.prf | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) (limited to 'mkspecs/features/configure.prf') diff --git a/mkspecs/features/configure.prf b/mkspecs/features/configure.prf index c772a3407a..e1040d250e 100644 --- a/mkspecs/features/configure.prf +++ b/mkspecs/features/configure.prf @@ -1,30 +1,4 @@ -QMAKE_MAKE = $$(MAKE) -!isEmpty(QMAKE_MAKE) { - # We were called recursively. Use the right make, as MAKEFLAGS may be set as well. -} else:if(equals(MAKEFILE_GENERATOR, UNIX)|equals(MAKEFILE_GENERATOR, MINGW)) { - !equals(QMAKE_HOST.os, Windows): \ - QMAKE_MAKE = make - else: \ - QMAKE_MAKE = mingw32-make -} else:if(equals(MAKEFILE_GENERATOR, MSVC.NET)|equals(MAKEFILE_GENERATOR, MSBUILD)) { - QMAKE_MAKE = nmake -} else { - error("Configure tests are not supported with the $$MAKEFILE_GENERATOR Makefile generator.") -} - -# Ensure that a cache is present. If none was found on startup, this will create -# one in the build directory of the project which loads this feature. -cache() - -QMAKE_CONFIG_LOG = $$dirname(_QMAKE_CACHE_)/config.log -QMAKE_CONFIG_TESTS_DIR = $$_PRO_FILE_PWD_/config.tests - -defineTest(qtRunLoggedCommand) { - msg = "+ $$1" - write_file($$QMAKE_CONFIG_LOG, msg, append) - system("$$1 >> \"$$QMAKE_CONFIG_LOG\" 2>&1")|return(false) - return(true) -} +load(configure_base) # Try to build the test project in $$QMAKE_CONFIG_TESTS_DIR/$$1 # ($$_PRO_FILE_PWD_/config.tests/$$1 by default). -- cgit v1.2.3