Uploaded image for project: 'Qt Creator'
  1. Qt Creator
  2. QTCREATORBUG-4273

Qt Spectrum demo - Creator tries to run release binary when debug build is selected

    XMLWordPrintable

Details

    Description

      The Qt spectrum demo has a different .pro file structure to the other demos, as it consists not just of an executable, but also a DLL:

      spectrum/
          spectrum.pro
          spectrum.pri
          app/
              app.pro
          3rdparty/
              fftreal/
                  fftreal.pro
      

      In order to ensure that the demo can be launched by qtdemo, the .pro files contains DESTDIR directives which put the binaries (both spectrum.exe, built by app.pro, and fftreal.dll, built by fftreal.pro) into ${BUILD_ROOT}/debug or ${BUILD_ROOT}/release depending on the build configuration. This is done as follows:

      # In spectrum.pri
      win32 {
          build_pass {
              CONFIG(release, release|debug): spectrum_build_dir = /release
              CONFIG(debug, release|debug): spectrum_build_dir = /debug
          }
      }
      
      # In fftreal.pro
      TEMPLATE = lib
      TARGET = fftreal
      DESTDIR = ../..$${spectrum_build_dir}
      
      # In app.pro
      TEMPLATE = app
      TARGET = spectrum
      LIBS += -L..$${spectrum_build_dir}
      LIBS += -lfftreal
      DESTDIR = ..$${spectrum_build_dir}
      

      The problem is that QtCreator does not run a build_pass step, so the spectrum_build_dir variable never gets set. This means that it always tries to launch a binary from ${BUILD_ROOT}/spectrum.exe

      Attachments

        Issue Links

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

          Activity

            People

              dt Daniel Teske
              gastockw Gareth Stockwell
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes