Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Using a variable in QtCreator's Shadow build directory doesn't appear to work
Forum Updated to NodeBB v4.3 + New Features

Using a variable in QtCreator's Shadow build directory doesn't appear to work

Scheduled Pinned Locked Moved General and Desktop
6 Posts 3 Posters 2.3k Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • V Offline
    V Offline
    VRHans
    wrote on last edited by VRHans
    #1

    I'm trying to modify the output directories for QtCreator because I'm building a host application and qml plugins for that host application and my host application needs to be able to determine where to dynamically load plugins from.

    I can modify the shadow build directory just fine without using a QtCreator variable.

    If I add a QtCreator variable, part of the build process works; however, jom (nmake clone?) can't seem to find the makefile.

    For example, if I specify:

    C:\MyStuff\MyProduct\bin\app\

    Everything builds fine.

    If I try to include the kit name it only works for the first part of the build (the part that generates the Makefiles.)

    For example, usin:

    C:\MyStuff\MyProduct\bin\app\%{CurrentKit:Name}

    and then building, yields a correctly created directory structure, that contains the three Makefiles (Makefile, Makefile.Debug, Makefile.Release) but the build fails with the output:

    18:53:38: Running steps for project MyContainerApp...
    18:53:38: Starting: "C:\Qt\Qt5.6.0\5.6\msvc2015_64\bin\qmake.exe" C:\MyStuff\MyProduct\MyApp\Discovery\MyContainerApp\MyContainerApp.pro -r -spec win32-msvc2015 "CONFIG+=debug" "CONFIG+=qml_debug"
    18:53:39: The process "C:\Qt\Qt5.6.0\5.6\msvc2015_64\bin\qmake.exe" exited normally.
    18:53:39: Cannot find Makefile. Check your build settings.
    Error while building/deploying project MyContainerApp (kit: windows)
    When executing step "Make"
    18:53:39: Elapsed time: 00:00.

    I presume that jom.exe is getting passed "C:\MyStuff\MyProduct\bin\app%{CurrentKit:Name}" rather than a properly evaluated string.

    I couldn't seem to get jom to emit any debug info to let me know where exactly it was looking for the makefile.

    Anyone run into this?

    Cheers!

    P.S. I forgot to add that the Make build step in QtCreator Projects setting for the windows kit shows the correct path to the Makefile (presumably the UI to display that string is evaluating the kit variable.)

    1 Reply Last reply
    0
    • kshegunovK Offline
      kshegunovK Offline
      kshegunov
      Moderators
      wrote on last edited by kshegunov
      #2

      @VRHans
      Hello,

      I use this to shadow-build on windows:

      win32  {
      	DESTDIR = $$OUT_PWD		# Fix for (windows') shadow building
      }
      

      I haven't tested it with a variable though.

      Kind regards.

      Read and abide by the Qt Code of Conduct

      V 1 Reply Last reply
      0
      • kshegunovK kshegunov

        @VRHans
        Hello,

        I use this to shadow-build on windows:

        win32  {
        	DESTDIR = $$OUT_PWD		# Fix for (windows') shadow building
        }
        

        I haven't tested it with a variable though.

        Kind regards.

        V Offline
        V Offline
        VRHans
        wrote on last edited by
        #3

        @kshegunov Do you disable shadow building in QtCreator and put that in your *.pro file? (Sorry, I'm a noob at QtCreator.)

        kshegunovK 1 Reply Last reply
        0
        • V VRHans

          @kshegunov Do you disable shadow building in QtCreator and put that in your *.pro file? (Sorry, I'm a noob at QtCreator.)

          kshegunovK Offline
          kshegunovK Offline
          kshegunov
          Moderators
          wrote on last edited by
          #4

          @VRHans
          No, not at all. I leave the checkbox clicked and just add that line to my project file.

          Read and abide by the Qt Code of Conduct

          1 Reply Last reply
          0
          • A Offline
            A Offline
            asanka424
            wrote on last edited by
            #5

            This is how I override qt creators default directory structure

            win32{

            RC_FILE = myfile.rc
            DESTDIR =     $$PWD/Dist
            OBJECTS_DIR = $$PWD/Temp/obj
            MOC_DIR =     $$PWD/Temp/moc
            RCC_DIR =     $$PWD/Temp/rcc
            UI_DIR =      $$PWD/Temp/gui
            

            }

            very usefull if you want to have a clean build directory

            1 Reply Last reply
            0
            • V Offline
              V Offline
              VRHans
              wrote on last edited by
              #6

              I haven't been able to use a QtCreator variable sadly - I've worked around by making some default assumptions about the structure of the project instead. Thanks for the suggestions though :).

              1 Reply Last reply
              0

              • Login

              • Login or register to search.
              • First post
                Last post
              0
              • Categories
              • Recent
              • Tags
              • Popular
              • Users
              • Groups
              • Search
              • Get Qt Extensions
              • Unsolved