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 to adding static library to cmakelists project

how to adding static library to cmakelists project

Scheduled Pinned Locked Moved Unsolved General and Desktop
2 Posts 2 Posters 591 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.
  • S Offline
    S Offline
    SherifOmran
    wrote on last edited by
    #1

    hello guys

    i am new to cmake, i used to use qmake, in my qmake i have the following for adding a static library that is inside a folder called bin, inside the project folder

    macx: LIBS += -L$$PWD/bin/lib/ -lnanomsg
    INCLUDEPATH += $$PWD/bin/include
    DEPENDPATH += $$PWD/bin/include
    macx: PRE_TARGETDEPS += $$PWD/bin/lib/libnanomsg.a
    

    what is the corressponding cmake syntax?

    1 Reply Last reply
    0
    • Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      See cmake docu: target_link_libraries

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      1

      • Login

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