UCL / GreatCMakeCookOff

Bunch of CMake pain in the baker

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Coherent Python in Windows

raquelalegre opened this issue · comments

At the moment to make Windows find Python.h we have to add this to cmake:

-DPYTHON_INCLUDE_DIR="C:\tools\Miniconda3\envs\dcprogs\include"

You could also do -DCMAKE_PREFIX_PATH="C:\tools\Miniconda3\envs\dcprogs\. This will ensure anything under that prefix is found, not just python.

If conda defines some environment variable (VIRTUAL_ENV?), it might be possible to make discovery automatic.