On Thu, Jun 17, 2010 at 09:02:08AM +0200, ext Matthias Pospiech wrote:
> I have a variable 'LIBRARYPATH'
> 
> which is used in the following way
> 
> LIBRARYPATH = E:/Daten/Dev/SVN/library/
> INCLUDEPATH += $${LIBRARYPATH}include/Micos/
> 
> however this path is different on every computer. If I add
> "LIBRARYPATH = E:/Daten/Dev/SVN/library/" to the qmake command line
> options the part is not added to the INCLUDEPATH anymore
>
this should actually change nothing in both qmake and creator -
in qmake the value from the pro file will overwrite it (avoid that by
prefixing the assignment with isEmpty(LIBRARYPATH): ), and creator will
not process the command line option at all.

> So how can I add a Path to qmake on commandline such that QtCreator 
> still uses it ?
> 
try this:

LIBRARYPATH2 = $$(LIBRARYPATH)  ## *don't* reuse the variable name below
!isEmpty(LIBRARYPATH2) {
  INCLUDEPATH += $${LIBRARYPATH2}include/Micos/
} else {
  LIBRARYPATH = E:/Daten/Dev/SVN/library/
  INCLUDEPATH += $${LIBRARYPATH}include/Micos/
}

and pass LIBRARYPATH *in the environment*.

in creator 2.0, the variable name reuse constraint is removed under
most circumstances, so this should work as well:

LIBRARYPATH = $$(LIBRARYPATH)
isEmpty(LIBRARYPATH):LIBRARYPATH = E:/Daten/Dev/SVN/library/
INCLUDEPATH += $${LIBRARYPATH}include/Micos/

_______________________________________________
Qt-creator mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-creator

Reply via email to