[Interest] Help a unix guy on windows qmake

Thiago Macieira thiago.macieira at intel.com
Wed Apr 21 19:14:24 CEST 2021


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.
-- 
Thiago Macieira - thiago.macieira (AT) intel.com
  Software Architect - Intel DPG Cloud Engineering





More information about the Interest mailing list