Namespaces

Variants
Actions

Please note that as of October 24, 2014, the Nokia Developer Wiki will no longer be accepting user contributions, including new entries, edits and comments, as we begin transitioning to our new home, in the Windows Phone Development Wiki. We plan to move over the majority of the existing entries over the next few weeks. Thanks for all your past and future contributions.

Variables in .pro file

From Wiki
Jump to: navigation, search

This article explains how to define and use your own variable-like keywords in Qt project's .pro file.

Article Metadata
Tested withCompatibility
Platform(s):
Symbian
Article
Keywords: .pro
Created: truf (25 Nov 2011)
Last edited: hamishwillee (11 Oct 2012)

Introduction

In some cases developer needs variables in Qt project's .pro files. For example, in case his project is just a template with several parameters. Following snippet demonstrates how such functionality could be declared in .pro file:

#declare new keyword DLLFILENAME
DEFINES += DLLFILENAME
#assign some value to it
DLLFILENAME = myapp_20037EED
#use it in further .pro file statements:
TARGET = $${DLLFILENAME}
 
mmpBlock = \
"SOURCEPATH . " \
" START RESOURCE impl.rss " \
" TARGET $${DLLFILENAME} " \
" TARGETPATH resource\\plugins " \
" LANG SC " \
"END "
MMP_RULES += mmpBlock
This page was last modified on 11 October 2012, at 01:19.
59 page views in the last 30 days.

Was this page helpful?

Your feedback about this content is important. Let us know what you think.

 

Thank you!

We appreciate your feedback.

×