Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Special Interest Groups
  3. QtonPi
  4. Any way to set a kit-specific target.path?
Forum Updated to NodeBB v4.3 + New Features

Any way to set a kit-specific target.path?

Scheduled Pinned Locked Moved Solved QtonPi
4 Posts 2 Posters 2.8k 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.
  • vikramgV Offline
    vikramgV Offline
    vikramg
    wrote on last edited by
    #1

    I have two kits, one for RPi and another for Odroid. I would like to configure the same project for both kits, and deploy to both in possibly different locations on either device. Is there a way to set the target.path independently for both kits? How can I avoid having to change the target.path in the .pro file every time I switch kits?

    I tried setting target.path to one that I might replicate on both devices, e.g.

    target.path = ~/Projects/Qt
    

    but I guess the ~ is a shell expansion, so that doesn't work.

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      One thing you could try is to modify the build environment variables (in the kit page) and add there a variable for the path you would like to use but beware, it will also be valid for all your other projects. Otherwise, you can do something similar that will only apply to your project in the Build part of the Project panel.

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • vikramgV Offline
        vikramgV Offline
        vikramg
        wrote on last edited by
        #3

        I tried what you suggested, and added a Build Env variable called QT_TARGET_DIR, set to /home/odroid/Projects/Qt. Then in my .pro file I set target.path = $QT_TARGET_DIR. That worked, but to my surprise, the deploy step had created a new directory called $QT_TARGET_DIR under /home/odroid and deposited the executable there.

        So I changed target.path to target.path = Projects/Qt and now it works (although I'm not sure how - does $HOME get prefixed conditionally onto target.path?), deploying to ~/Projects/Qt on both devices. I can live with that, but if there is a clean way to specify absolute target path via a build env var, please let me know.

        1 Reply Last reply
        0
        • SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #4

          I'd recommend using some other prefix for your environment variable. At some point it could be used by the project or some colleague of you might think it's an official environment variable used by the Qt project.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          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