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

27 lines
831 B
CMake
Raw Normal View History

2016-04-12 16:22:53 +01:00
#BREW install for Python3
if (APPLE)
foreach (i 3.6 3.5 3.4 3.3 3.2 3.1 3.0)
set (PYTHON_INCLUDE_DIRS /usr/local/Frameworks/Python.framework/Versions/${i}/Headers)
message("Trying Python ${i}")
if (EXISTS ${PYTHON_INCLUDE_DIRS})
set (PYTHON_EXECUTABLE /usr/local/bin/python${i} CACHE FILEPATH "Path to a program" FORCE )
set (PYTHON_INCLUDE_DIR /usr/local/Frameworks/Python.framework/Versions/${i}/include/python${i}m
CACHE PATH "Path to a file." FORCE )
set (PYTHON_LIBRARY /usr/local/Frameworks/Python.framework/Versions/${i}/lib/libpython${i}.dylib
CACHE FILEPATH "Path to a library" FORCE )
break()
endif()
endforeach()
endif()
find_package(PythonInterp)
find_package(PythonLibs)
macro_log_feature (PYTHONLIBS_FOUND "Python"
"Use Python System"
"http://www.python.org" FALSE)