This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
yap-6.3/cmake/python.cmake

40 lines
1.0 KiB
CMake
Raw Normal View History

2017-05-08 18:51:29 +01:00
set (Python_ADDITIONAL_VERSIONS 3.7 3.6 3.5 3.6 3.4 )
2016-04-12 16:22:53 +01:00
2017-05-08 18:51:29 +01:00
find_package(PythonInterp)
2017-05-14 11:36:09 +01:00
find_package(PythonLibs)
2016-12-10 07:02:46 +00:00
2017-05-14 11:36:09 +01:00
# PYTHONLIBS_FOUND - have the Python libs been found
# PYTHON_LIBRARIES - path to the python library
# PYTHON_INCLUDE_PATH - path to where Python.h is found (deprecated)
# PYTHON_INCLUDE_DIRS - path to where Python.h is found
# PYTHON_DEBUG_LIBRARIES - path to the debug library (deprecated)
# PYTHONLIBS_VERSION_STRING - version of the Python libs found (since CMake 2.8.8)
2017-05-14 11:36:09 +01:00
##
#
2017-05-08 18:51:29 +01:00
2017-05-14 11:36:09 +01:00
include_directories( BEFORE ${PYTHON_INCLUDE_DIRS} )
2017-05-08 18:51:29 +01:00
LIST( APPEND
2017-05-14 11:36:09 +01:00
CMAKE_REQUIRED_INCLUDES ${PYTHON_INCLUDE_DIRS} ${CMAKE_REQUIRED_INCLUDES})
2016-10-16 23:18:51 +01:00
2017-05-08 18:51:29 +01:00
check_include_file(Python.h HAVE_PYTHON_H)
2016-10-16 23:18:51 +01:00
2017-05-08 18:51:29 +01:00
IF (PYTHONLIBS_FOUND)
add_subDIRECTORY (packages/python)
ENDIF()
2017-05-08 18:51:29 +01:00
if (PYTHONLIBS_FOUND AND SWIG_FOUND)
add_subdirectory(packages/python/swig)
include(FindPythonModule)
2016-12-10 07:02:46 +00:00
2017-05-08 18:51:29 +01:00
find_python_module( jupyter )
if (PY_JUPYTER)
add_subdirectory(packages/python/yap_kernel)
ENDIF()
endif()