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. QMAKE_HOST.mac_version ?

QMAKE_HOST.mac_version ?

Scheduled Pinned Locked Moved Solved General and Desktop
4 Posts 2 Posters 218 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.
  • D Offline
    D Offline
    davecotter
    wrote on last edited by
    #1

    i know on mac, that QMAKE_HOST.version will return the version of DARWIN running under macOS, but i could have sworn i found a way to get the macOS version out of QMAKE_HOST, somehow, but now no matter how deft my google-fu, i'm unable to find it.

    CAN i get the macOS version out of a var at the time my qmake file is parsed?

    1 Reply Last reply
    0
    • D Offline
      D Offline
      davecotter
      wrote on last edited by
      #4

      i was able to get it using $$system(sw_vers -productVersion)! Thanks for the tip!

      -dave

      1 Reply Last reply
      0
      • D Offline
        D Offline
        davecotter
        wrote on last edited by
        #2

        i'm surprised it should be so difficult to just fetch the version of macOS that the qmake file is being run on.

        sierdzioS 1 Reply Last reply
        0
        • D davecotter

          i'm surprised it should be so difficult to just fetch the version of macOS that the qmake file is being run on.

          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #3

          @davecotter said in QMAKE_HOST.mac_version ?:

          i'm surprised it should be so difficult to just fetch the version of macOS that the qmake file is being run on.

          Weirdly, it is rarely necessary to get this info.

          You should be able to do it in a platform-dependent way, like:

          macos {
          OS_VER=$$system("sw_vers")
          message("System version is "$$OS_VER)
          }
          

          (Z(:^

          1 Reply Last reply
          2
          • D Offline
            D Offline
            davecotter
            wrote on last edited by
            #4

            i was able to get it using $$system(sw_vers -productVersion)! Thanks for the tip!

            -dave

            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