fix npm auto-corrected some errors in your package.json when publishing.
[liba.git] / cmake / FindPython.cmake
blobc9e6bfcb3fa3e32bbff9b2084dcd65b56217a03a
1 #.rst:
2 # FindPython
3 # ----------
5 # https://cmake.org/cmake/help/latest/module/FindPythonInterp.html
6 # https://cmake.org/cmake/help/latest/module/FindPythonLibs.html
7 # https://cmake.org/cmake/help/latest/module/FindPython.html
9 # Result Variables
10 # ^^^^^^^^^^^^^^^^
12 # This module defines the following variables:
14 # ``PYTHON_FOUND``, ``Python_FOUND``
16 # ``PYTHON_EXECUTABLE``, ``Python_EXECUTABLE``
18 if(CMAKE_VERSION VERSION_LESS 3.12)
19   set(PythonInterp_FIND_VERSION ${Python_FIND_VERSION})
20   include(${CMAKE_ROOT}/Modules/FindPythonInterp.cmake)
21   list(FIND Python_FIND_COMPONENTS Development PYTHON_FOUND)
22   if(${PYTHON_FOUND} GREATER -1)
23     list(INSERT Python_ADDITIONAL_VERSIONS 0 ${Python_FIND_VERSION})
24     list(INSERT Python_ADDITIONAL_VERSIONS 0 ${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR})
25     include(${CMAKE_ROOT}/Modules/FindPythonLibs.cmake)
26   endif()
27   set(Python_EXECUTABLE ${PYTHON_EXECUTABLE})
28   set(PYTHON_FOUND ${PYTHONINTERP_FOUND})
29   set(Python_FOUND ${PYTHONINTERP_FOUND})
30 else()
31   include(${CMAKE_ROOT}/Modules/FindPython.cmake)
32   set(PYTHON_EXECUTABLE ${Python_EXECUTABLE})
33   set(PYTHON_FOUND ${Python_FOUND})
34 endif()