How to set enviorment variable from . pro file?
Unsolved
General and Desktop
-
You don't. And even if you could, the .pro only controls the build. The LIBGL_ALWAYS_SOFTWARE variable for Mesa is something you can set in the environment when you run a program, not when you build it.
-
This solves
int main(int argc, char *argv[]) { #ifdef Q_OS_LINUX //to run valgrind memcheck under vmware... avoids crash qputenv( "LIBGL_ALWAYS_SOFTWARE","1"); #endif
-
@Q139 This solution will prevent hardware opengl on every linux installation. Don't think you really want this... better set the env outside your program.
-
@Christian-Ehrlicher Yes , Is it possible to check for valgrind debug with preprocessor macro?
Sorry idk how memcheck VM works, perhaps valgrind is initialised at later stage+outside of qt and its not possible with preprocessor... -
Since you know when you run your tool with valgrind you can also set this env var before.