Using qmake variables

Is there a way to get qmake to replace a user variable like this? In other words, I want to replace $ (LIBS) with a LIBS variable so that I can easily change the switch path from machine to machine. Thank you very much in advance!

LIBS = c:/tmp/libs.pfo INCLUDEPATH += . \ $(LIBS)/OpenCV2.1-msvc/include \ $(LIBS)/OpenCV2.1-msvc/modules/core/include \ $(LIBS)/OpenCV2.1-msvc/modules/imgproc/include \ ... 

I also tried this to no avail:

 LIBS = c:/tmp/libs.pfo INCLUDEPATH += . \ $$quote($$LIBS/OpenCV2.1-msvc/include) \ $$quote($$LIBS/OpenCV2.1-msvc/modules/core/include) \ $$quote($$LIBS/OpenCV2.1-msvc/modules/imgproc/include) \ ... 
+4
source share
1 answer

UPDATE: After watching another thread, I tried a third trick that will work! qmake cannot evaluate the correct variable

 LIBS = c:/tmp/libs.pfo INCLUDEPATH += . \ $$quote($${LIBS}/OpenCV2.1-msvc/include) \ $$quote($${LIBS}/OpenCV2.1-msvc/modules/core/include) \ $$quote($${LIBS}/OpenCV2.1-msvc/modules/imgproc/include) \ ... 
+4
source

Source: https://habr.com/ru/post/1342364/


All Articles