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 de3a806def
Change-Id: I920a0b40a6ded12140f251352da53b68eef6560d
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This commit is contained in:
parent
e6a845ad88
commit
17e2befe2a
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user