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 OSX environement variables in a .pro file [SOLVED]
Forum Updated to NodeBB v4.3 + New Features

Using OSX environement variables in a .pro file [SOLVED]

Scheduled Pinned Locked Moved General and Desktop
2 Posts 1 Posters 642 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.
  • K Offline
    K Offline
    kloveridge
    wrote on last edited by
    #1

    I have Qt on my laptop and desktop. I have a library I had to move from one drive to another on my desktop. Now, my .pro file can't find the library unless I manually change the library path between my Desktop and laptop.

    Currently my .pro file is like this:

    @DEFINES += OSMac_
    MAYALOCATION=/Applications/Autodesk/maya2015
    INCLUDEPATH += $$MAYALOCATION/devkit/include@

    What I would rather have is to have MAYALOCATION be defined by an environment variable on my system. I just don't know how to access environment variables in the .pro file

    This is a basic problem I'm sure. But it doesn't change the fact I can't do what I need to do until I figure it out!

    1 Reply Last reply
    0
    • K Offline
      K Offline
      kloveridge
      wrote on last edited by
      #2

      This worked. I made a environment variables called MAYAROOT with the appropriate path for the laptop and desktop. I changed the code above to this and everything worked:

      @DEFINES += OSMac_
      INCLUDEPATH += $$MAYAROOT/devkit/include@

      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