[Interest] Help a unix guy on windows qmake

Jason H jhihn at gmx.com
Wed Apr 21 19:41:29 CEST 2021



> Sent: Wednesday, April 21, 2021 at 1:14 PM
> From: "Thiago Macieira" <thiago.macieira at intel.com>
> To: interest at qt-project.org
> Subject: Re: [Interest] Help a unix guy on windows qmake
>
> On Wednesday, 21 April 2021 09:54:09 PDT Jason H wrote:
> > Now, when compiling, regardless of shadow build or not, refer to the libs by
> > adding to the project: +++ project.pro
> > + mingw {
> > +     INCLUDEPATH += $PROJ/libraries/win/include
> > +     LIBS += -L$PROJ/libraries/win/$ARCH -lvendor
> > + }
> >
> > It seems that $PWD ${PWD} or whatever ($${PWD}?) refer to the build dir, be
> > it shadow or not. I don't want to copy the libraries to the shadow dir in
> > QMAKE_PRE_LINK because they *never* change.
>
> You're mixing environment variables and qmake variables. Qmake variables
> always start with a double dollar sign and are expanded by qmake when it
> writes the Makefile output. You can see their value with message().
>
> qmake does not expand environment variables at all.
>
> $ X=A qmake Y=b /dev/stdin -o /dev/null <<<'message(r = $X $$Y)'
> Project MESSAGE: r = $X b
>
> The environment variables are written as-is to your Makefile. It's up to you
> to write something that make will understand.
>
> $PROJ is not a valid environment variable expansion in Make.


Right. I used $PROJ for illustrative purposes. I guess the flaw in my thinking
is that when the shadow build is made, that there is some way to reference the
original location( other than ../project_name

Maybe all I need is:
PROJ=../project

Thank you for example. Very enlightening.


More information about the Interest mailing list