Fix compilation problem with external package Hal
Fixes the problem also when passing path info as CMake parameters for FairSoft/FairRoot apr21p2/v18.6.7.
The solution now works for CMake parameters as well as for environment variables for both FairSoft/FairRoot combinations apr21p2/v18.6.7 and nov22p1/v18.8.0.
Edited by Florian Uhlig