Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-105731

qt_generate_deploy_app_script: Add a way to specify an additional CMake script file

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Done
    • P2: Important
    • 6.5.0 Beta1
    • 6.3.1
    • Build System: CMake
    • None
    • All
    • 6ed89be125 (qt/qtbase/dev) 6ed89be125 (qt/tqtc-qtbase/dev)

    Description

      qt_generate_deploy_app_script generates a CMake script that calls qt_deploy_runtime_dependencies.

      For setups that need customization, we currently have to generate the script like this:

      set(deploy_script "${CMAKE_CURRENT_BINARY_DIR}/deploy_MyApp.cmake")
      file(GENERATE OUTPUT ${deploy_script} CONTENT "
      include(\"${QT_DEPLOY_SUPPORT}\")
      
      qt_deploy_runtime_dependencies(
          EXECUTABLE \"\${QT_DEPLOY_BIN_DIR}/$<TARGET_FILE_NAME:MyApp>\"
          GENERATE_QT_CONF
      )")
      

      There's a lot of escaping going on. That doesn't help with readability.
      It would be nice if the deployment code could live in a separate .cmake file.

      Note that we cannot use file(GENERATE OUTPUT ... INPUT ...), because there, we don't have variable expansions, and we need to expand QT_DEPLOY_SUPPORT for the first include statement.

      It would be nice to have a convenient way to specify the deployment code in a separate file. Maybe like this:

        qt_generate_deploy_app_script(
            TARGET MyApp
            FILENAME_VARIABLE deploy_script
            INPUT ${CMAKE_CURRENT_SOURCE_DIR}/deploy_myapp.cmake
            NO_UNSUPPORTED_PLATFORM_ERROR
        )
      

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            jbornema Joerg Bornemann
            jbornema Joerg Bornemann
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes