# See http://www.salome-platform.org/ or email : webmaster.salome@opencascade.com
#
+IF (NOT SALOMEPYTHONINTERP_FOUND)
+ MESSAGE(STATUS "Loading SALOME Python environment")
+ FIND_PACKAGE(SalomePythonInterp REQUIRED)
+ENDIF(NOT SALOMEPYTHONINTERP_FOUND)
+
SET(SALOMEBOOTSTRAP_ROOT_DIR "$ENV{SALOMEBOOTSTRAP_ROOT_DIR}")
-SET(ENV{PYTHONPATH} "${SALOMEBOOTSTRAP_ROOT_DIR}/__SALOME_BOOTSTRAP__:$ENV{PYTHONPATH}")
+IF(WIN32 AND NOT CYGWIN)
+ SET(ENV{PYTHONPATH} "${SALOMEBOOTSTRAP_ROOT_DIR}\\__SALOME_BOOTSTRAP__;$ENV{PYTHONPATH}")
+ELSE()
+ SET(ENV{PYTHONPATH} "${SALOMEBOOTSTRAP_ROOT_DIR}/__SALOME_BOOTSTRAP__:$ENV{PYTHONPATH}")
+ENDIF()
+EXECUTE_PROCESS(COMMAND ${PYTHON_EXECUTABLE} -c "import SalomeOnDemandTK; print(SalomeOnDemandTK.__version__)" OUTPUT_VARIABLE SALOMEBOOTSTRAP_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
-EXECUTE_PROCESS(COMMAND python3 -c "import SalomeOnDemandTK; print(SalomeOnDemandTK.__version__)" OUTPUT_VARIABLE SALOMEBOOTSTRAP_VERSION OUTPUT_STRIP_TRAILING_WHITESPACE)
IF(SALOMEBOOTSTRAP_VERSION)
SET(SALOMEBOOTSTRAP_FOUND TRUE)
MESSAGE(STATUS "Found Salome Bootstrap version ${SALOMEBOOTSTRAP_VERSION}")