Get global variable in *.pro file. How?
-
Hello all!
I need to use global variable from system environment in *.pro file. How to do it correctly?
Something like this:DESTDIR = $$(A_PREBUILT_LIBS_ROOT) PRI_FILE = $$DESTDIR/file.pri include($$PRI_FILE) message(Pri file dir $$DESTDIR)How to get A_PREBUILT_LIBS_ROOT from system environment?
For now I see this:Project MESSAGE: Pri file dirThe example from documentation
DESTDIR1 = $$(PWD) message(The project will be installed in $$DESTDIR1)Doesn't work either, I see this:
Project MESSAGE: The project will be installed in -
Issue solved. Solution found.
For me works only this:DESTDIR = $$system(echo $A_PREBUILT_LIBS_ROOT)And in the project build environment set this:

Is
$$(A_PREBUILT_LIBS_ROOT)not working?https://doc.qt.io/qt-5/qmake-language.html#variable-expansion
To obtain the contents of an environment value when qmake is run, use the $$(...) operator
