[Qt-creator] Environment variable setting per platform
Petric Frank
pfrank at gmx.de
Fri Aug 5 20:25:43 CEST 2016
Hello Tobias,
Am Freitag, 5. August 2016, 14:32:10 schrieb Tobias Hunger:
> On Thu, Aug 4, 2016 at 11:56 PM, Petric Frank <pfrank at gmx.de> wrote:
> > Hello,
> >
> > in QtCreator you can configure environment variables in the project
> > settings.
>
> ... and in the Kit settings, too.
Good to know - will have a look.
> > But i want them to be defined in the qmake file. Is that possible ?
>
> You can definitely have platform specific sections in the qmake files.
> I am not sure whether you can export environment variables from there,
> but you can definitely set qmake variables based on platform and use
> those in you build system and export them to your compiler. We do that
> in the creator build system.
>
> > Reason: Working on different platforms (i.e. Linux, Windows, ...) and
> > machines i have to remove the *.pro.user file because of a version
> > miswmatch of QtCreator. Then the setting of QtCreator is lost.
To be more precise on my actual problem - i had to execute a pre-build
step (here: cppumaker of libreoffice). The tool executable requres some
shared libs (*.so in Linux, *.dll in Windows) to be able to run. These are not
in the search path.
Under Linux i had to set LD_LIBRARY_PATH, under Windows i have to extend
the PATH variable.
I tried to set LD_LIBRARY_PATH in the qmake file, but it did not work.
> You can not really check the .user* files into version control
> systems. That is right.
version control is currently not used here - but will be.
> > Any hints (other than a fixed setting before starting QtCreator) ?
>
> Maybe setting the environment variables in the kit works for your use
case?
This is that dialog box when selecting the "Environment"-button ?
In the edit field - should i enter the values in the style
<name>=<value>
?
The reason why i want the environment variables in the qmake file - you
can build the project from command line.
kind regards
Petric
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/qt-creator/attachments/20160805/62d5f4a4/attachment.html>
More information about the Qt-creator
mailing list