Important: Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

[iOS & qmake] How to add custom target?


  • Qt Champions 2016

    Hi ,

    I have a .pro file with following lines:

    @
    archive.target = archive
    archive.commands = cd $${OUT_PWD}; xcodebuild -scheme $${TARGET} -archivePath $${OUT_PWD}/$${TARGET}.xcarchive
    QMAKE_EXTRA_TARGETS += archive
    @

    It should add a custom target ,"archive" , in the Makefile. I have proven the code works with Mac OSX. However, it don't work with iOS platform.

    The generated Makefile do not contains the archive target. Instead it goes to $${TAGRET}.xcodeproj/qt_preprocess.mak

    Therefore , I can not build the target via make. Is that a bug or expected behaviour for iOS? Any method to use custom target just like other platforms?

    Thanks for any advice.


Log in to reply