Qt Forum

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Unsolved

    Unsolved iOS builds ignoring PRE_TARGETDEPS and QMAKE_EXTRA_TARGETS

    Mobile and Embedded
    1
    2
    201
    Loading More Posts
    • 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
      mooglus last edited by mooglus

      I need to compile another team's c code as a library. I have this working for Windows, Mac and Android, but my iOS build seems to ignore the PRE_TARGETDEPS variable. Essentially I have the following in my .pro file, but the mydep.commands = line never executes, even if I change it to mydep.commands = echo Hello.

      ios {
       QMAKE_EXTRA_TARGETS += mydep
       PRE_TARGETDEPS += mydep
       mydep.commands = make myioslib -C $$PWD/libs/mylib
      
       HEADERS += $$PWD/libs/mylib/libmylib.h
       LIBS += -L$$PWD/libs/mylib/ -lmylib
      }
      

      LIBS += gets seen, because the build then fails during linking

      I'm using Qt 5.12.1

      Is there anything special I need to do for iOS?

      Thanks for any help

      1 Reply Last reply Reply Quote 0
      • M
        mooglus last edited by mooglus

        Current workaround is...

        ios {
          system("make myioslib -C $$PWD/libs/mylib")
          HEADERS += $$PWD/libs/mylib/libmylib.h
          LIBS += -L$$PWD/libs/mylib/ -lmylib
        }
        
        1 Reply Last reply Reply Quote 0
        • First post
          Last post