Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt Creator and other tools
  4. QMake .pro file : include other makefile

QMake .pro file : include other makefile

Scheduled Pinned Locked Moved Qt Creator and other tools
4 Posts 3 Posters 8.0k 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.
  • B Offline
    B Offline
    bkamps
    wrote on last edited by
    #1

    Hi,

    Currently we have several non-qt projects with some common makefiles. Right now I created an Qt project and now I want to include the common makefile to support some targets used by all projects.

    Is there some way to tell qmake to include other makefiles in the makefile generated by qmake? I have searched the web but couldn't find the solution..

    1 Reply Last reply
    0
    • G Offline
      G Offline
      goetz
      wrote on last edited by
      #2

      Maybe a subdirs project can do the trick:

      @
      TEMPLATE = subdirs
      SUBDIRS = commonlib speciallib
      commonlib.makefile = /path/to/commonlib/makefile
      speciallib.makefile = /path/to/speciallib/makefile
      @

      (Brain to terminal, not tested; see the "SUBDIRS":http://doc.qt.nokia.com/4.7/qmake-variable-reference.html#subdirs reference doc for further details).

      You will have to add the resulting libs etc. to your actual project then.

      http://www.catb.org/~esr/faqs/smart-questions.html

      1 Reply Last reply
      0
      • B Offline
        B Offline
        bkamps
        wrote on last edited by
        #3

        I get errors that it cannot find the .pro file..

        TEMPLATE = subdirs
        SUBDIRS = common_unittest
        common_unittest.makefile = ../../Makefile.common_unittest

        Results:
        cd common_unittest/ && /home/dm051/sotasm3/qt/build/bin/qmake /home/dm051/sotasm3/AdvancedMmi/unittest_src/common_unittest/common_unittest.pro CONFIG+=debug_and_release -o ../../Makefile.common_unittest
        Cannot find file: /home/dm051/sotasm3/AdvancedMmi/unittest_src/common_unittest/common_unittest.pro.
        make: *** [common_unittest/../../Makefile.common_unittest] Error 2

        1 Reply Last reply
        0
        • S Offline
          S Offline
          solotim
          wrote on last edited by
          #4

          http://www.qtforum.org/article/14616/mixing-qmake-makefiles-and-standard-mafefiles.html

          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