]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Use PYTHON_ROOT_DIR environment variable rnv/cmake_build
authorrnv <rnv@opencascade.com>
Wed, 10 Oct 2018 20:27:32 +0000 (23:27 +0300)
committerrnv <rnv@opencascade.com>
Wed, 10 Oct 2018 20:27:32 +0000 (23:27 +0300)
CMakeCommon/FindPython.cmake

index c38d221274fbf3cf67fde6bd363b028db74c84a0..da2a36152e70def816363c3e38da7ed3481dc027 100644 (file)
@@ -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)