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

[REG 6.8 → 6.9] CMAKE add_custom_command with POST_BUILD is not being evaluated after build but before

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P2: Important
    • None
    • 6.9.0
    • Build System: CMake
    • None
    • Android

    Description

      hello,

       

      so in my general cmake which I use since Qt 6.2, i have inside qt_add_qml_module() inside RESOURCES cmd file "android/postscript.cmd" which is copied during build to android build folder.

       

      later on in my CMake i have this:

      add_custom_command(POST_BUILD
          TARGET ${TARGET_NAME}
          WORKING_DIRECTORY "${CMAKE_BINARY_DIR}/android-build-${TARGET_NAME}"
          COMMAND cmd /c ${CMAKE_BINARY_DIR}/android-build-${TARGET_NAME}/postscript.cmd
      )

      which just runs the postscript.cmd

       

      this worked since ever... upon building a project, android build folder was created and copy of postscript.cmd was copied to this android build... then the apk was generated and after that this postscript.cmd did run...

       

      unfortunately since 6.9 ninja gives me error that he can not find the postscript in android build directory... however this build directory is not yet created at all... so this add_custom_command with POST_BUILD actually evaluates even before Qt creates android build directory!

      Attachments

        Issue Links

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

          Activity

            People

              qtbuildsystem Qt Build System Team
              shokarta Jiri Zaloudek
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:

                Gerrit Reviews

                  There are no open Gerrit changes