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. [solved] Multiple targets in Qt project
Forum Updated to NodeBB v4.3 + New Features

[solved] Multiple targets in Qt project

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

    I have a Qt project, for a shared library:

    @
    TARGET =foo
    TEMPLATE = lib
    INSTALLS += TARGET
    @

    After compile there is libfoo0.1.0.so and it links against say A, B, C, D. For some reason I need to divide my project into three or more projects. Say foo, bar, baz and they link against A, A and B, C, D. I don't want to divide it into several projects though.

    Is this achievable by editing .pro file?

    1 Reply Last reply
    0
    • sierdzioS Offline
      sierdzioS Offline
      sierdzio
      Moderators
      wrote on last edited by
      #2

      You can use subproject template (but that still requires 3 different .pro files).

      (Z(:^

      1 Reply Last reply
      0
      • S Offline
        S Offline
        soroush
        wrote on last edited by
        #3

        [quote author="sierdzio" date="1358411703"]You can use subproject template (but that still requires 3 different .pro files).[/quote]

        Yea, already doing that. It's better to have a single project instead.

        Now I'm looking for a way to install headers in appropriate locations in /usr/include...

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

          Fount this thread: http://qt-project.org/forums/viewthread/9160

          How did he tell .pro to install headers?

          1 Reply Last reply
          0
          • S Offline
            S Offline
            soroush
            wrote on last edited by
            #5

            Found the from here: http://www.qtcentre.org/threads/29923-How-does-one-get-quot-make-install-quot-target-to-install-quot-ui_-quot-generated-header-files
            @
            target.path += $$INSTALL_DIR/lib # get the library file
            headers.path = $$INSTALL_DIR/include
            headers.extra = "cp $$BUILD_DIR/ui_.h $$INSTALL_DIR/include"
            headers.files =
            src/app/
            .h
            INSTALLS += headers target
            @

            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