[Development] Qmake variable for iOS

Mohamed Fawzi Fawzi.Mohamed at digia.com
Fri Feb 14 15:36:31 CET 2014


Hi,

qmake for ios is a bit strange, in the sense that it treats device and simulator as two build  versions.
This is like debug and release, setting it in CONFIG sets the default used in Makefile, but it also still generates specific makefiles for each possible combination (iphoneos debug/relase,...).
This is a bit unecessary, especially for how it is used in creator (shadow build, always setting the default, and always building using the default Makefile.
So message is misleading because it is called for each Makefile version.
Thill it should work, have you tried to see?

Fawzi

On 10 Feb 2014, at 01:30, Shobana Suresh <SSuresh at esri.com<mailto:SSuresh at esri.com>> wrote:


Hello All,

I am trying to find the qmake variable that could be used to differentiate between the iPhone simulator and iPhone arm kits.
In my .pro file, I would like to use conditions like

  1.
ios {
  2.
    CONFIG += c++11
  3.
    iphonesimulator {
  4.
      message("iphonesimulator")
  5.
      #Do Something
  6.
    }
  7.
    iphoneos{
  8.
      message("iphoneos")
  9.
     #Do Something
  10.
    }
  11.
}

On running qmake with the iphonesimulator kit, it prints out

  1.
Project MESSAGE: iphonesimulator
  2.
Project MESSAGE: iphonesimulator
  3.
Project MESSAGE: iphonesimulator
  4.
Project MESSAGE: iphonesimulator
  5.
Project MESSAGE: iphoneos
  6.
Project MESSAGE: iphonesimulator
  7.
Project MESSAGE: iphonesimulator
  8.
Project MESSAGE: iphoneos

With iPhone device kit , it prints

  1.
Project MESSAGE: iphoneos
  2.
Project MESSAGE: iphoneos
  3.
Project MESSAGE: iphoneos
  4.
Project MESSAGE: iphonesimulator
  5.
Project MESSAGE: iphoneos
  6.
Project MESSAGE: iphoneos
  7.
Project MESSAGE: iphonesimulator
  8.
Project MESSAGE: iphoneos


I tried using the QT_ARCH variable, but message($$QT_ARCH) prints out “arm” for both the kits.

What is the correct qmake variable to use to differentiate between iPhone simulator and iPhone arm kits?


Regards

Shobana

_______________________________________________
Development mailing list
Development at qt-project.org<mailto:Development at qt-project.org>
http://lists.qt-project.org/mailman/listinfo/development

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/development/attachments/20140214/3f29c666/attachment.html>


More information about the Development mailing list