Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-95867

Make it possible to list multiple folders as sources of a projects for Android

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • None
    • 5.15
    • Build tools: qmake
    • None
    • Android build with QMake, not sure how those are specified under CMake, maybe this is not needed when doing CMake build. If that so, we can probably ignore, since QMake doesn'T have much future.

    • Android

    Description

      This is when doing QMake build (haven't test with CMake, since my .pri tooling is not yet ported). But the library are expected to be found into a single folder, making very hard to have a based application that taken source extension from other repos or sub repos (sub tree, etc).

       

      People did created script methods to copy the sources and started place the real sources into other folders and build the android/ folder by .pri/.pro instruction manually:
      https://github.com/lukevear/qmakeAndroidSourcesHelper
      I myself did a spin off of this file to adapt it for our need. 
       
      So I have to copy them:

      include(CopyAndroidSources.pri)
          
      defineReplace(androidPathMaker) {        
        for(a, $$3) { result += $$1/$$2/$${a}}
        return($$result)    
      }
      
      defineReplace(androidSourceMaker) {         
        return($$copyAndroidSources($$1, $$2, $$androidPathMaker($$3, $$4, $$5)))    }
      
      QMAKE_EXTRA_TARGETS += $$androidSourceMaker("Amotus_Android_Sources", "src/com/amotus", $$AMOTUS_ANDROID, "android/src/com/amotus", SOURCES_ANDROID_AMOTUS)
      
      

      I do this for all my source module that want to contribute to the Android library or native source (java file).
       
      Wish I could simply add a list of path that would be merged (can overwrite files).
       

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            qtbuildsystem Qt Build System Team
            jeromegodboutamotus Jerome Godbout
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes