Cleaning up the project file in QT - relative path or variable to store path to file?

Cleaning up the project file in QT - relative path or variable to store path to file?

Portrait de The Game Creators
Hi Guys, Those of you who have published to MeeGo probably know a little about the QT project settings file. I know slightly too little. I am looking for a way to clean up my project file. At the moment it looks like this: # defines DEFINES += IDE_MEEGO DEFINES += USE_BOX2D DEFINES += QT_OPENGL_ES DEFINES += QT_OPENGL_ES_2 # use _RELEASE to activate the AppUp protection code # DEFINES += _RELEASE # package config PKGCONFIG += gstreamer-0.10 \ glib-2.0 # qt flags QT += core QT += gui QT += opengl QT += network # include paths INCLUDEPATH += "C:/MeeGoSDK_1.2/MADDE/sysroots/meego-core-ia32-madde-sysroot-1.2.0-fs/usr/include/gstreamer-0.10" INCLUDEPATH += "C:/MeeGoSDK_1.2/MADDE/sysroots/meego-core-ia32-madde-sysroot-1.2.0-fs/usr/include/glib-2.0" INCLUDEPATH += "C:/MeeGoSDK_1.2/MADDE/sysroots/meego-core-ia32-madde-sysroot-1.2.0-fs/usr/lib/glib-2.0/include" INCLUDEPATH += "C:/TGCSHARED/GDKPro Workspace/GDKPro/common/Include" INCLUDEPATH += "C:\TGCSHARED\GDKPro Workspace\GDKPro\platform\meego\Source\appup\include" # library paths LIBS += "C:/MeeGoSDK_1.2/MADDE/sysroots/meego-core-ia32-madde-sysroot-1.2.0-fs/usr/lib/libQtSensors.so" LIBS += "C:/MeeGoSDK_1.2/MADDE/sysroots/meego-core-ia32-madde-sysroot-1.2.0-fs/usr/lib/libgstreamer-0.10.so" LIBS += "C:/MeeGoSDK_1.2/MADDE/sysroots/meego-core-ia32-madde-sysroot-1.2.0-fs/lib/libpthread.so.0" LIBS += -lxml2 -lpthread LIBS += "C:\TGCSHARED\GDKPro Workspace\GDKPro\platform\meego\Source\appup\lib\libadpruntime.a" \ "C:\TGCSHARED\GDKPro Workspace\GDKPro\platform\meego\Source\appup\lib\libadpcore.a" \ "C:\TGCSHARED\GDKPro Workspace\GDKPro\platform\meego\Source\appup\lib\libxerces-c.a" \ "C:\TGCSHARED\GDKPro Workspace\GDKPro\platform\meego\Source\appup\lib\libxml-security-c.a" \ "C:\TGCSHARED\GDKPro Workspace\GDKPro\platform\meego\Source\appup\lib\libcrypto.a" # toggle between these to switch between debug and release library LIBS += "C:/TGCSHARED/GDKPro Workspace/GDKPro/platform/meego/Lib/Release/libAGKMeeGo.a" #LIBS += "C:/TGCSHARED/GDKPro Workspace/GDKPro/platform/meego/Lib/Debug/libAGKMeeGo.a" # files to be packed and installed target.path = /opt/com.thegamecreators.agkplayer/ icon.files = icon/icon.png icon.path = /usr/share/icons/ icon16.files = icon/icon_16.png icon16.path = /usr/share/icons/hicolor/16x16/apps/ icon32.files = icon/icon_32.png icon32.path = /usr/share/icons/hicolor/32x32/apps/ icon64.files = icon/icon_64.png icon64.path = /usr/share/icons/hicolor/64x64/apps/ icon128.files = icon/icon_128.png icon128.path = /usr/share/icons/hicolor/128x128/apps/ desktop.files = agkplayer.desktop desktop.path = /usr/share/applications # optionally include media with binary (/opt/com.company.app/ for binaries, /var/opt/com.company.app/sounds/ for app files) #media.files = media/*.* #media.path = /var/opt/com.thegamecreators.foo/ #INSTALLS += target icon icon16 icon32 icon64 icon128 desktop media # target on device target.path = /opt/com.thegamecreators.agkplayer INSTALLS += target icon icon16 icon32 icon64 icon128 desktop # include .spec file OTHER_FILES += \ agkplayer.spec As you can see it lots of lovely things to set up my MeeGo game engine (ala AGK), but I want it to look neater and easier to change, to something like this: # defines DEFINES += IDE_MEEGO DEFINES += USE_BOX2D DEFINES += QT_OPENGL_ES DEFINES += QT_OPENGL_ES_2 # use _RELEASE to activate the AppUp protection code # DEFINES += _RELEASE # package config PKGCONFIG += gstreamer-0.10 \ glib-2.0 # qt flags QT += core QT += gui QT += opengl QT += network # my paths SDKPATH = "C:/MeeGoSDK_1.2/MADDE/sysroots/meego-core-ia32-madde-sysroot-1.2.0-fs/" AGKPATH = "C:/TGCSHARED/GDKPro Workspace/GDKPro/" # include paths INCLUDEPATH += SDKPATH + "usr/include/gstreamer-0.10" INCLUDEPATH += SDKPATH + "usr/include/glib-2.0" INCLUDEPATH += SDKPATH + "usr/lib/glib-2.0/include" INCLUDEPATH += AGKPATH + "common/Include" INCLUDEPATH += AGKPATH + "platform\meego\Source\appup\include" # library paths LIBS += SDKPATH + "usr/lib/libQtSensors.so" LIBS += SDKPATH + "usr/lib/libgstreamer-0.10.so" LIBS += SDKPATH + "usr/lib/libpthread.so.0" LIBS += -lxml2 -lpthread LIBS += AGKPATH +"platform\meego\Source\appup\lib\libadpruntime.a" \ AGKPATH +"platform\meego\Source\appup\lib\libadpcore.a" \ AGKPATH +"platform\meego\Source\appup\lib\libxerces-c.a" \ AGKPATH +"platform\meego\Source\appup\lib\libxml-security-c.a" \ AGKPATH +"platform\meego\Source\appup\lib\libcrypto.a" # toggle between these to switch between debug and release library LIBS += AGKPATH + "platform/meego/Lib/Release/libAGKMeeGo.a" #LIBS += AGKPATH + "platform/meego/Lib/Debug/libAGKMeeGo.a" # files to be packed and installed target.path = /opt/com.thegamecreators.agkplayer/ icon.files = icon/icon.png icon.path = /usr/share/icons/ icon16.files = icon/icon_16.png icon16.path = /usr/share/icons/hicolor/16x16/apps/ icon32.files = icon/icon_32.png icon32.path = /usr/share/icons/hicolor/32x32/apps/ icon64.files = icon/icon_64.png icon64.path = /usr/share/icons/hicolor/64x64/apps/ icon128.files = icon/icon_128.png icon128.path = /usr/share/icons/hicolor/128x128/apps/ desktop.files = agkplayer.desktop desktop.path = /usr/share/applications # optionally include media with binary (/opt/com.company.app/ for binaries, /var/opt/com.company.app/sounds/ for app files) #media.files = media/*.* #media.path = /var/opt/com.thegamecreators.foo/ #INSTALLS += target icon icon16 icon32 icon64 icon128 desktop media # target on device target.path = /opt/com.thegamecreators.agkplayer INSTALLS += target icon icon16 icon32 icon64 icon128 desktop # include .spec file OTHER_FILES += \ agkplayer.spec I wanted to know if the tokens I was using are possible, and how would the project file look? Even better is there a token which automatically knows the absolute path of the MeeGo project folder, so I can skip manually defining the AGKPATH token each time I move the project somewhere. Thanks in advance :)
1 contribution / 0 nouveau(x)
Reportez-vous à notre Notice d'optimisation pour plus d'informations sur les choix et l'optimisation des performances dans les produits logiciels Intel.