I have a python script that generates .cpp sources that are used in consequent compilation. The script uses some 3rd-party modules, and I'm trying to set PYTHONPATH to modules location.
I tried to do set(ENV${PYTHONPATH} "/path/to/modules"), but unfortunately it works only for generation time i.e. execute_process(COMMAND python the_script.py), while I need it to work for add_custom_command/add_custom_target.
I am using Visual Studio 14 2015 Win64 generator.