×
Namespaces

Variants
Actions

Variables in .pro file

From Nokia Developer 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 04:19.
36 page views in the last 30 days.
×