qtmobility/qtmobility.pro
branchRCL_3
changeset 6 eb34711bcc75
parent 2 5822d84012fb
child 13 4203353e74ea
--- a/qtmobility/qtmobility.pro	Tue Apr 27 17:29:55 2010 +0300
+++ b/qtmobility/qtmobility.pro	Tue May 11 16:58:44 2010 +0300
@@ -19,6 +19,27 @@
     #happen if we are trying to shadow build w/o running configure
 }
 
+#creating qbuildcfg header
+!exists($$QT_MOBILITY_BUILD_TREE/src/global){
+	message("creating qbuildcfg header")
+	symbian|win32|wince*{
+		system($$QMAKE_MKDIR $$QT_MOBILITY_BUILD_TREE\src\global)
+	}
+	else{
+		system($$QMAKE_MKDIR $$QT_MOBILITY_BUILD_TREE/src/global)
+	}
+}
+	
+QCFGH_OUTPUT=$$QT_MOBILITY_BUILD_TREE/src/global/qbuildcfg.h
+mobilityprefixpath = $$QT_MOBILITY_PREFIX
+symbian|win32|wince*{
+	mobilityprefixpath = $$replace(mobilityprefixpath, \\\, \\\\)
+	system(echo static const char qt_mobility_configure_prefix_path_str [512 + 12] = \"$$mobilityprefixpath\\0\"; > $$QCFGH_OUTPUT)
+}
+else{
+	system(echo static const char qt_mobility_configure_prefix_path_str [512 + 12] = '\\\"$$mobilityprefixpath\\\0\\\"\;' > $$QCFGH_OUTPUT)
+}
+
 
 #don't build QtMobility if chosen config mismatches Qt's config
 win32:!contains(CONFIG_WIN32,build_all) {
@@ -41,28 +62,34 @@
 }
 
 
-#generate prf file for Qt integration
-#PRF_OUTPUT=$${QT_MOBILITY_BUILD_TREE}/features/mobility.prf
+# MCL builds for Symbian do not run configure and require some manual setup steps.
+# This test permits SD builds to skip installation of mobility.prf from within qmake.
+# It is installed in a separate step. MCL builds for SD must set the
+# MOBILITY_SD_MCL_BUILD flag to yes.
+!contains(MOBILITY_SD_MCL_BUILD, yes) {
+    #generate prf file for Qt integration
+    PRF_OUTPUT=$${QT_MOBILITY_BUILD_TREE}/features/mobility.prf
 
-#system(echo MOBILITY_PREFIX=$${QT_MOBILITY_PREFIX} > $$PRF_OUTPUT)
-#system(echo MOBILITY_INCLUDE=$${QT_MOBILITY_INCLUDE} >> $$PRF_OUTPUT)
-#system(echo MOBILITY_LIB=$${QT_MOBILITY_LIB} >> $$PRF_OUTPUT)
-
-#unix:!symbian:system(cat $${QT_MOBILITY_SOURCE_TREE}/features/mobility.prf.template >> $$PRF_OUTPUT)
-#win32:system(type $${QT_MOBILITY_SOURCE_TREE}\features\mobility.prf.template >> $$PRF_OUTPUT)
-#symbian:system(type $${QT_MOBILITY_SOURCE_TREE}\features\mobility.prf.template >> $$PRF_OUTPUT)
+    system(echo MOBILITY_PREFIX=$${QT_MOBILITY_PREFIX} > $$PRF_OUTPUT)
+    system(echo MOBILITY_INCLUDE=$${QT_MOBILITY_INCLUDE} >> $$PRF_OUTPUT)
+    system(echo MOBILITY_LIB=$${QT_MOBILITY_LIB} >> $$PRF_OUTPUT)
 
-#symbian does not generate make install rule. we have to copy prf manually 
-#symbian {
-#    FORMATDIR=$$[QT_INSTALL_DATA]\mkspecs\features\
-#    FORMATDIR=$$replace(FORMATDIR,/,\\ )
-#    system(copy "$${QT_MOBILITY_BUILD_TREE}\features\mobility.prf $$FORMATDIR")
-#}
+    unix:!symbian:system(cat $${QT_MOBILITY_SOURCE_TREE}/features/mobility.prf.template >> $$PRF_OUTPUT)
+    win32:system(type $${QT_MOBILITY_SOURCE_TREE}\features\mobility.prf.template >> $$PRF_OUTPUT)
+    symbian:system(type $${QT_MOBILITY_SOURCE_TREE}\features\mobility.prf.template >> $$PRF_OUTPUT)
 
-# install feature file
-#feature.path = $$[QT_INSTALL_DATA]/mkspecs/features
-#feature.files = $$QT_MOBILITY_BUILD_TREE/features/mobility.prf
-#INSTALLS += feature
+    #symbian does not generate make install rule. we have to copy prf manually 
+    symbian {
+        FORMATDIR=$$[QT_INSTALL_DATA]\mkspecs\features
+        FORMATDIR=$$replace(FORMATDIR,/,\\ )
+        system(copy "$${QT_MOBILITY_BUILD_TREE}\features\mobility.prf $$FORMATDIR")
+    }
+
+    # install feature file
+    feature.path = $$[QT_INSTALL_DATA]/mkspecs/features
+    feature.files = $$QT_MOBILITY_BUILD_TREE/features/mobility.prf
+    INSTALLS += feature
+}
 
 TEMPLATE = subdirs
 CONFIG+=ordered