1 ## Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 UNSET(PYTHON_INCLUDE_DIRS)
4 UNSET(PYTHON_LIBRARIES)
7 IF(CMAKE_BUILD_TYPE STREQUAL "Debug")
8 SET(PYTHON_LIBRARY_FILE "python27_d.lib")
10 SET(PYTHON_LIBRARY_FILE "python27.lib")
13 SET(PYTHON_LIBRARY_FILE "libpython2.7.so")
18 FILE(TO_CMAKE_PATH "$ENV{PYTHONHOME}/libs/${PYTHON_LIBRARY_FILE}" PATH_PYTHON_LIBRARY)
20 FILE(TO_CMAKE_PATH "$ENV{PYTHONHOME}/lib/${PYTHON_LIBRARY_FILE}" PATH_PYTHON_LIBRARY)
22 SET(PYTHON_LIBRARY ${PATH_PYTHON_LIBRARY} CACHE FILEPATH "path to the python library" FORCE)
25 IF($ENV{PYTHON_INCLUDE})
26 FILE(TO_CMAKE_PATH $ENV{PYTHON_INCLUDE} PATH_PYTHON_INCLUDE_DIR)
27 SET(PYTHON_INCLUDE_DIR ${PATH_PYTHON_INCLUDE_DIR} CACHE PATH "path to where Python.h is found" FORCE)
30 FIND_PACKAGE(PythonLibs REQUIRED)
31 FIND_PACKAGE(PythonInterp REQUIRED)
33 INCLUDE_DIRECTORIES(${PYTHON_INCLUDE_DIR})