Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved qmake Variable containing the target platform

    General and Desktop
    2
    2
    374
    Loading More Posts
    • 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.
    • W
      WayneGoetz last edited by

      Hi,

      I would like to add code like this into my .pro file:

      DESTDIR = build/$$TARGET_PLATFORM
      

      But I do not know which variable I could use for "$$TARGET_PLATFORM". It should be something like "linux", "ios", "android" etc.

      Thanks,
      Nathan

      1 Reply Last reply Reply Quote 0
      • SGaist
        SGaist Lifetime Qt Champion last edited by

        Hi,

        You can doit using scopes:

        win32: TARGET_PLATFORM = windows
        

        However, why do you want that ? Shadow builds are usually a better idea since they provide a separated builder for each platform and debug/release builds.

        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 Reply Quote 0
        • First post
          Last post