From: rnv Date: Wed, 10 Oct 2018 20:27:32 +0000 (+0300) Subject: Use PYTHON_ROOT_DIR environment variable X-Git-Tag: V9_2_0a2~24^2 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=63ad1862738f5cce24761fe82d8ac1f7c0fe3cb9;p=modules%2Fshaper.git Use PYTHON_ROOT_DIR environment variable --- diff --git a/CMakeCommon/FindPython.cmake b/CMakeCommon/FindPython.cmake index c38d22127..da2a36152 100644 --- a/CMakeCommon/FindPython.cmake +++ b/CMakeCommon/FindPython.cmake @@ -25,6 +25,13 @@ ENDIF() IF(DEFINED ENV{PYTHON_INCLUDE}) FILE(TO_CMAKE_PATH $ENV{PYTHON_INCLUDE} PATH_PYTHON_INCLUDE_DIR) SET(PYTHON_INCLUDE_DIR ${PATH_PYTHON_INCLUDE_DIR} CACHE PATH "path to where Python.h is found" FORCE) +ELSE() + IF(WIN32) + IF(DEFINED ENV{PYTHON_ROOT_DIR}) + SET(PYTHON_ROOT_DIR $ENV{PYTHON_ROOT_DIR}) + SET(PYTHON_INCLUDE_DIR ${PYTHON_ROOT_DIR} CACHE PATH "path to where Python.h is found" FORCE) + ENDIF() + ENDIF() ENDIF() FIND_PACKAGE(PythonInterp REQUIRED)