From: adam Date: Wed, 29 Apr 2009 15:43:39 +0000 (+0000) Subject: Modify the search for python executable in accordance X-Git-Tag: CCAR_cm3_start~1 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=c22ec86ba7a2d8f56dd91e9039df591f3556c775;p=modules%2Fkernel.git Modify the search for python executable in accordance of the official python windows i.e. python.exe is in PYTHON_HOME --- diff --git a/salome_adm/cmake_files/FindPYTHON.cmake b/salome_adm/cmake_files/FindPYTHON.cmake index 9d9934c33..a03b563a4 100644 --- a/salome_adm/cmake_files/FindPYTHON.cmake +++ b/salome_adm/cmake_files/FindPYTHON.cmake @@ -86,7 +86,7 @@ IF(PYTHON_STATUS) SET(PYTHON_EXECUTABLE_PATHS) ELSE(NOT PYTHON_ROOT_USER) IF(WINDOWS) - SET(PYTHON_EXECUTABLE_PATHS ${PYTHON_ROOT_USER} ${PYTHON_ROOT_USER}/bin ${PYTHON_ROOT_USER}/PCbuild) + SET(PYTHON_EXECUTABLE_PATHS ${PYTHON_ROOT_USER}) ELSE(WINDOWS) SET(PYTHON_EXECUTABLE_PATHS ${PYTHON_ROOT_USER}/bin) ENDIF(WINDOWS) @@ -97,12 +97,10 @@ IF(PYTHON_STATUS) IF(PYTHON_EXECUTABLE STREQUAL /usr/bin/python) ELSE(PYTHON_EXECUTABLE STREQUAL /usr/bin/python) SET(PYTHON_ROOT_USER ${PYTHON_EXECUTABLE}) - IF(PYTHON_EXECUTABLE STREQUAL ${PYTHON_ROOT_USER}/${PYTHON_EXECUTABLE_TO_FIND}) + GET_FILENAME_COMPONENT(PYTHON_ROOT_USER ${PYTHON_ROOT_USER} PATH) + IF(NOT WINDOWS) GET_FILENAME_COMPONENT(PYTHON_ROOT_USER ${PYTHON_ROOT_USER} PATH) - ELSE(PYTHON_EXECUTABLE STREQUAL ${PYTHON_ROOT_USER}/${PYTHON_EXECUTABLE_TO_FIND}) - GET_FILENAME_COMPONENT(PYTHON_ROOT_USER ${PYTHON_ROOT_USER} PATH) - GET_FILENAME_COMPONENT(PYTHON_ROOT_USER ${PYTHON_ROOT_USER} PATH) - ENDIF(PYTHON_EXECUTABLE STREQUAL ${PYTHON_ROOT_USER}/${PYTHON_EXECUTABLE_TO_FIND}) + ENDIF(NOT WINDOWS) ENDIF(PYTHON_EXECUTABLE STREQUAL /usr/bin/python) ELSE(PYTHON_EXECUTABLE) IF(PYTHON_ROOT_USER)