Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Platform detection with CMake
Qt 6.12 LTS is out! See what's new in the release blog

Platform detection with CMake

Scheduled Pinned Locked Moved Unsolved General and Desktop
3 Posts 3 Posters 710 Views
  • 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
    Devoo
    wrote on last edited by Devoo
    #1

    Hey,
    Is it possible to detect the platform with CMake?
    I mean qt solution or maybe some other common solution?

    I have trouble with IOs and OSx detectcion.

    Best regards.

    J.HilkJ VRoninV 2 Replies Last reply
    0
    • D Devoo

      Hey,
      Is it possible to detect the platform with CMake?
      I mean qt solution or maybe some other common solution?

      I have trouble with IOs and OSx detectcion.

      Best regards.

      J.HilkJ Offline
      J.HilkJ Offline
      J.Hilk
      Moderators
      wrote on last edited by
      #2

      @Devoo
      5081abaa-0d18-495c-a888-29c366d6bfec-image.png
      link

      if (WIN32)
          #do something
      endif (WIN32)
      

      Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


      Q: What's that?
      A: It's blue light.
      Q: What does it do?
      A: It turns blue.

      1 Reply Last reply
      0
      • D Devoo

        Hey,
        Is it possible to detect the platform with CMake?
        I mean qt solution or maybe some other common solution?

        I have trouble with IOs and OSx detectcion.

        Best regards.

        VRoninV Offline
        VRoninV Offline
        VRonin
        wrote on last edited by
        #3

        @Devoo said in Platform detection with CMake:

        I mean qt solution

        https://wiki.qt.io/Get_OS_name

        "La mort n'est rien, mais vivre vaincu et sans gloire, c'est mourir tous les jours"
        ~Napoleon Bonaparte

        On a crusade to banish setIndexWidget() from the holy land of Qt

        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
        • Unsolved