qt_generate_deploy_qml_app_script generates script with empty include()

Here’s a CMakeLists.txt that is attempting to use the CMake macro qt_generate_deploy_qml_app_script. I’m following the blog here [1]. Everything seems fine until the install stage, where it seems the deploy script is missing some environment variables being set. The main one I’ve discovered so far is ${QT_DEPLOY_SUPPORT}. This seems to be something the Core library should set at some point, but it’s empty in my case resulting in a deploy script that errors out.

find_package(Qt6 COMPONENTS Core Gui Qml REQUIRED)
qt_standard_project_setup()

set(QML_FILES
    qml/Intro.qml
    qml/RootWindow.qml
)

set(CPP_FILES
    QWarClientApp.cpp
)

qt_add_executable(QWarClient
    main.cpp
)

qt_add_qml_module(QWarClient
    VERSION 1.0
    URI "QWarClient"
    QML_FILES ${QML_FILES}
    SOURCES ${CPP_FILES}
)

target_link_libraries(QWarClient
    PRIVATE
    Qt6::Core
    Qt6::Gui
    Qt6::Qml
)

install(TARGETS QWarClient
    RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR}
)

qt_generate_deploy_qml_app_script(
    TARGET QWarClient
    FILENAME_VARIABLE deploy_script
    NO_UNSUPPORTED_PLATFORM_ERROR
)

message("deploy script name: ${deploy_script}")
message("qt_deploy_support: ${QT_DEPLOY_SUPPORT}")
install(SCRIPT ${deploy_script})

the generated deploy script ends up looking like this:

include()
_qt_internal_show_skip_runtime_deploy_message("static Qt libs")
_qt_internal_show_skip_qml_runtime_deploy_message()

Is there something I’m missing here?

[1] https://www.qt.io/blog/cmake-deployment-api

Crud - I meant to post this to the Qt forums. I’ll leave it here for a bit while I post it over there and then perhaps I can share the answer here.