From 17e2befe2a18fcb29a17bd51d16e4ba935d9f7ef Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Tue, 12 Nov 2019 12:57:17 +0100 Subject: [PATCH] Don't install QtFooTestsConfig.cmake if no modules were built When configuring qtx11extras on macOS, we ended up installing the file, which made Coin think that at least one module was built, and thus it tried to build tests as well. Don't install the file if no modules were built, thus preventing from trying to build tests in Coin. Amends de3a806def4b9a754825a2233c9d4952a9b2d0eb Change-Id: I920a0b40a6ded12140f251352da53b68eef6560d Reviewed-by: Leander Beernaert Reviewed-by: Simon Hausmann --- cmake/QtPostProcess.cmake | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/cmake/QtPostProcess.cmake b/cmake/QtPostProcess.cmake index c6b4e8c4dd1..b063562937b 100644 --- a/cmake/QtPostProcess.cmake +++ b/cmake/QtPostProcess.cmake @@ -358,6 +358,12 @@ function(qt_internal_create_config_file_for_standalone_tests) list(JOIN QT_REPO_KNOWN_MODULES " " QT_REPO_KNOWN_MODULES_STRING) string(STRIP "${QT_REPO_KNOWN_MODULES_STRING}" QT_REPO_KNOWN_MODULES_STRING) + # Skip generating and installing file if no modules were built. This make sure not to install + # anything when build qtx11extras on macOS for example. + if(NOT QT_REPO_KNOWN_MODULES_STRING) + return() + endif() + # Ceate a Config file that calls find_package on the modules that were built as part # of the current repo. This is used for standalone tests. configure_file(