diff --git a/cmake/QtPostProcessHelpers.cmake b/cmake/QtPostProcessHelpers.cmake index 518bfee580d..6100bb1d45d 100644 --- a/cmake/QtPostProcessHelpers.cmake +++ b/cmake/QtPostProcessHelpers.cmake @@ -681,18 +681,16 @@ endif()\n") string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS "${install_prefix_content}") - if(NOT BUILD_SHARED_LIBS) - # The top-level check needs to happen inside QtBuildInternals, because it's possible - # to configure a top-level build with a few repos and then configure another repo - # using qt-configure-module in a separate build dir, where QT_SUPERBUILD will not - # be set anymore. - string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS - " + # The top-level check needs to happen inside QtBuildInternals, because it's possible + # to configure a top-level build with a few repos and then configure another repo + # using qt-configure-module in a separate build dir, where QT_SUPERBUILD will not + # be set anymore. + string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS + " if(DEFINED QT_REPO_MODULE_VERSION AND NOT DEFINED QT_REPO_DEPENDENCIES AND NOT QT_SUPERBUILD) qt_internal_read_repo_dependencies(QT_REPO_DEPENDENCIES \"$\{PROJECT_SOURCE_DIR}\") endif() ") - endif() if(DEFINED OpenGL_GL_PREFERENCE) string(APPEND QT_EXTRA_BUILD_INTERNALS_VARS