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. Using SYSROOT in .pro file
Forum Updated to NodeBB v4.3 + New Features

Using SYSROOT in .pro file

Scheduled Pinned Locked Moved Solved QtonPi
3 Posts 2 Posters 5.4k Views 2 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

    Is sysroot accessible via some predefined environment variable in the .pro file? I would like to specify library path on the target using the sysroot, e.g.:

    LIBS += -L$${SYSROOT}/my/lib/location -lmisc
    

    I tried using QT_SYSROOT which does have the value that I want, but that doesn't seem to work in the pro file. Can the qmake variables not be used?

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

      Hi,

      IIRC, you have to use square brackets to get such a property from qmake itself.

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

      vikramgV 1 Reply Last reply
      0
      • SGaistS SGaist

        Hi,

        IIRC, you have to use square brackets to get such a property from qmake itself.

        vikramgV Offline
        vikramgV Offline
        vikramg
        wrote on last edited by
        #3

        Thanks, that works! Use as follows:

        LIBS += -L$$[QT_SYSROOT]/my/lib/location -lmisc
        

        Official documentation here: http://doc.qt.io/qt-5.9/qmake-language.html (See "Accessing qmake Properties".)

        1 Reply Last reply
        2

        • Login

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