[Development] Relative paths in EXAMPLE_FILES in .pro files

Sumedha Widyadharma sumedha.widyadharma at basyskom.com
Mon Aug 4 08:57:25 CEST 2014


Morning,

EXAMPLE_FILES contains a list of additional example files for a project. 
The files referenced in the variable will be installed by qmake to the 
appropriate examples destination.
See: mkspecs/features/qt_example_installs.prf

On 08/02/2014 06:19 PM, Thiago Macieira wrote:
> On Friday 01 August 2014 16:45:16 Sumedha Widyadharma wrote:
>> Hi,
>>
>> This seems to be forbidden in a .pro file:
>>
>> EXAMPLE_FILES += ../some/file
>>
>> what is the rationale behind not allowing this?
>
> Why is it forbidden?

The file is simply not installed as an example file.
It is _silently_ dropped.

The rationale behind not allowing .. is to have examples self-contained, 
this I get. Grouping examples accordingly is the solution here.

But dropping them silently by default seems very user-unfriendly.

>
>> It is silently dropped, you have to enable CONFIG+=check_examples to get
>> a notice about this. Why is that?
>
> About what?

When you set CONFIG+=check_examples you get a message when a file 
conatining '..' is referenced as an example file.

Example:
Project MESSAGE: Notice: 
/home/swid/src/qwebchannel/examples/qwebchannel/nodejs/nodejs.pro refers 
to ../../../src/webchannel/qwebchannel.js

>
> You can assign any value to any variable you want in qmake. Whether you make
> use of the variable or not, it's up to you.

This variable is used internally.

>
>> Shouldn't it always warn the user?
>
> About what?
>

About dropping an example file due to having non self-contained paths.

Mit freundlichen Grüßen,
Sumedha Widyadharma

-- 
Sumedha Widyadharma
System Integrator

basysKom GmbH
Robert-Bosch-Str. 7 | 64293 Darmstadt | Germany
Tel   : +49 6151 870 589 128  | Fax: +49 6151 870 589 199
sumedha.widyadharma at basyskom.com | www.basyskom.com

Handelsregister: Darmstadt HRB 9352
Geschäftsführung: Eva Brucherseifer, Heike Ziegler




More information about the Development mailing list