]> SALOME platform Git repositories - modules/shaper.git/commitdiff
Salome HOME
Fix checking of environment variable.
authormzn <mzn@opencascade.com>
Mon, 20 Aug 2018 11:18:24 +0000 (14:18 +0300)
committermzn <mzn@opencascade.com>
Mon, 20 Aug 2018 11:18:24 +0000 (14:18 +0300)
CMakeCommon/FindPython.cmake

index e48b6c206a10b729b18c512bde81b071b6368f0a..c38d221274fbf3cf67fde6bd363b028db74c84a0 100644 (file)
@@ -5,15 +5,15 @@ UNSET(PYTHON_LIBRARIES)
 
 IF(WIN32)
     IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
-      SET(PYTHON_LIBRARY_FILE "python27_d.lib")
+      SET(PYTHON_LIBRARY_FILE "python36_d.lib")
     ElSE()
-      SET(PYTHON_LIBRARY_FILE "python27.lib")
+      SET(PYTHON_LIBRARY_FILE "python36.lib")
     ENDIF()
 ElSE()
-    SET(PYTHON_LIBRARY_FILE "libpython2.7.so")
+    SET(PYTHON_LIBRARY_FILE "libpython3.6.so")
 ENDIF()
 
-IF($ENV{PYTHONHOME})
+IF(DEFINED ENV{PYTHONHOME})
   IF(WIN32)
     FILE(TO_CMAKE_PATH "$ENV{PYTHONHOME}/libs/${PYTHON_LIBRARY_FILE}" PATH_PYTHON_LIBRARY)
   ElSE()
@@ -22,12 +22,12 @@ IF($ENV{PYTHONHOME})
   SET(PYTHON_LIBRARY ${PATH_PYTHON_LIBRARY} CACHE FILEPATH "path to the python library" FORCE)
 ENDIF()
 
-IF($ENV{PYTHON_INCLUDE})
+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)
 ENDIF()
 
-FIND_PACKAGE(PythonLibs REQUIRED)
 FIND_PACKAGE(PythonInterp REQUIRED)
+FIND_PACKAGE(PythonLibs REQUIRED)
 
-INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIR})
+INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIR})
\ No newline at end of file