Imagine++
|
Environment variables are variables of the system, whose values are character strings. They are used mostly to indicate paths or preferences. In particular, the variable PATH
indicates where to look when you launch an application from the command line (and also to find dynamic libraries, files with extension .dll, under Windows). PATH
is thus a list of folders.
The other important variable concerning Imagine++ is Imagine_DIR
, indicating the full path of the Imagine++ installation folder. Unless you choose a non-standard install location, this variable is not necessary under MacOS.
The variables relevant to Imagine++ are:
Imagine_DIR
, where you should set the folder where you installed Imagine++ (automatically set by the Windows intaller, not necessary under MacOS if you installed in the proposed location)CMAKE_PREFIX_PATH
The location where to find Qt5. This is a folder ending in .../lib/cmake
, such as /Users/pascal/Qt/5.7/clang64/lib/cmake
. Inside QtCreator, you should not need this variable.PATH
, where you should set the bin
folder of Qt. If the variable already had a value, separate with a semicolon (;).A portable way to deal with environment variables from QtCreator is the following:
However, this is only valid for the project at hand, to make it permanent, read on.
In a terminal, the command env
lists all known environment variables. To see the value of a variable, use echo $Imagine_DIR
. If nothing is written, that means the variable Imagine_DIR
is not set.
To set temporarily a variable, use the command
This value will be valid only for programs launched from this terminal. Other terminals will ignore it, as well as programs launched from the graphical environment.
~/.pam_environment
: In the Windows menu, right click on 'Computer' and select 'Properties' from the menu. In the left pane, click 'Advanced system settings' and press the button 'Environment Variables' in the new window. In the dialog, there are 'User variables', which you can set at will, and 'System variables' reserved for administrator.
You can check the values by opening a command window (cmd.exe
) and launching the command set
.