From e7f188b2d2f10941006be7b0e7197b3c1ebdefdb Mon Sep 17 00:00:00 2001 From: Alexandru Croitor Date: Wed, 13 Nov 2019 10:14:45 +0100 Subject: [PATCH] Don't include standalone tests config file if none exists Some repos like qtimageformats don't generate a config file for standalone tests because the repo creates no modules. Amends de3a806def4b9a754825a2233c9d4952a9b2d0eb Change-Id: Id42338804605a883f975feb5dd81eda5acc6e687 Reviewed-by: Leander Beernaert Reviewed-by: Alexandru Croitor --- cmake/QtBuildInternals/QtBuildInternalsConfig.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake index f06a9528f5..a81ef3cb8b 100644 --- a/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake +++ b/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake @@ -171,7 +171,7 @@ macro(qt_build_tests) qt_path_join(_qt_build_tests_install_prefix ${CMAKE_INSTALL_PREFIX} ${_qt_build_tests_install_prefix}) endif() - include("${_qt_build_tests_install_prefix}/${CMAKE_PROJECT_NAME}TestsConfig.cmake") + include("${_qt_build_tests_install_prefix}/${CMAKE_PROJECT_NAME}TestsConfig.cmake" OPTIONAL) # Of course we always need the test module as well. find_package(Qt6 ${PROJECT_VERSION} CONFIG REQUIRED COMPONENTS Test)