Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. [SOLVED]Android: Exclude subdir project
Qt 6.11 is out! See what's new in the release blog

[SOLVED]Android: Exclude subdir project

Scheduled Pinned Locked Moved Mobile and Embedded
9 Posts 2 Posters 2.8k 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.
  • M Offline
    M Offline
    mbnoimi
    wrote on last edited by
    #1

    How can I exclude subdir project from Android build?

    P.S. I tied to use but it still include in qmake
    @win32|linux|mac {
    SUBDIRS += openrpt
    }@

    1 Reply Last reply
    0
    • SGaistS Offline
      SGaistS Offline
      SGaist
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi,

      IIRC there's now the android scope so you could use

      @!android:SUBDIRS += openrpt@

      Hope it helps

      Interested in AI ? www.idiap.ch
      Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      0
      • M Offline
        M Offline
        mbnoimi
        wrote on last edited by
        #3

        [quote]IIRC there’s now the android scope so you could use [/quote]
        I tried it, I got same result of win32|linux|mac

        1 Reply Last reply
        0
        • M Offline
          M Offline
          mbnoimi
          wrote on last edited by
          #4

          BTW, I'm using Qt 5.1.0

          1 Reply Last reply
          0
          • M Offline
            M Offline
            mbnoimi
            wrote on last edited by
            #5

            Oops it seems I face issue with #if not with qmake... sorry my mistake:

            I discovered that this snippet doesn’t work... does it correct syntax?
            [code]#if defined(Q_OS_LINUX) || defined(Q_OS_WIN) || defined(Q_OS_MAC)
            #include <openrptrenderer.h>
            #endif[/code]

            1 Reply Last reply
            0
            • SGaistS Offline
              SGaistS Offline
              SGaist
              Lifetime Qt Champion
              wrote on last edited by
              #6

              You should add a check for !Q_OS_ANDROID. Android is a linux flavor.

              Interested in AI ? www.idiap.ch
              Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

              1 Reply Last reply
              0
              • M Offline
                M Offline
                mbnoimi
                wrote on last edited by
                #7

                [quote]You should add a check for !Q_OS_ANDROID. Android is a linux flavor.[/quote]
                I used what you said:
                [code]#ifdef !Q_OS_ANDROID
                #include <openrptrenderer.h>
                #endif[/code]
                But I got this error message:
                [quote]/home/mbnoimi/Projects/Desktop/Simple Invoice/src/SimpleInvoice/mainwindow.h:9: error: macro names must be identifiers[/quote]

                1 Reply Last reply
                0
                • SGaistS Offline
                  SGaistS Offline
                  SGaist
                  Lifetime Qt Champion
                  wrote on last edited by
                  #8

                  It was just pseudo code
                  The line should be:
                  @#if !defined(Q_OS_ANDROID)@

                  Interested in AI ? www.idiap.ch
                  Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • M Offline
                    M Offline
                    mbnoimi
                    wrote on last edited by
                    #9

                    Thanks a lot, it works :)

                    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