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. How do I set a library to only link under a specific platform in qmake
Forum Updated to NodeBB v4.3 + New Features

How do I set a library to only link under a specific platform in qmake

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

    I have 2 libraries I want to link but I want one to only link for Windows builds and one only for Linux builds
    How do I achieve this with qmake?

    M 1 Reply Last reply
    0
    • benjysugiB benjysugi

      I have 2 libraries I want to link but I want one to only link for Windows builds and one only for Linux builds
      How do I achieve this with qmake?

      M Offline
      M Offline
      mpergand
      wrote on last edited by mpergand
      #2

      @benjysugi

      You can do something like that:
      linux {
      LIBS += -yourlib1
      }
      win {
      LIBS += -yourlib2
      }

      That's just the idea, see qmake docs for more

      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