Skip to main content

Windows compilation in a nutshell - Setting up environment variables (part2)

Click on the New button

A window will popup :
. In the Variable name, set CMAKE_INCLUDE_PATH
.
In the Variable value, set %MINGW_DIR%\include

Then click Ok.

Click on the New button :
. In the Variable name, set CMAKE_LIBRARY_PATH
.
In the Variable value, set %MINGW_DIR%\bin

We will now edit the Path variable to provide an easy access to mingw binaries inside MSYS.
Look into the list of User variables list for the Path variable. Select it and click on the Edit button.

Note : If no such variable exist, just click on the New button and set PATH in the Variable name box.

The PATH variable contains several paths, separated by the ; character. You will have to add the following values to your PATH environment variable :

. %MINGW_DIR%\bin
. %MSYS_DIR%\bin
. %QT_DIR%\qt\bin

So, if you already add something in your PATH variable, it should look like this :
 <Original PATH value>;%MINGW_DIR%\bin ;%MSYS_DIR%\bin ;%QT_DIR%\qt\bin

If PATH was previously empty, it should look like this :
%MINGW_DIR%\bin ;%MSYS_DIR%\bin ;%QT_DIR%\qt\bin

Then click OK.

Next step: Setting up environment variables (part 3)
Previous step: Setting up environment variables (part 1)