2016-10-13 06:31:31 -05:00
|
|
|
include(cmake/find_python_module.cmake)
|
2017-04-24 14:53:45 -05:00
|
|
|
include(cmake/python_package_versions.cmake) # finds version
|
2016-10-13 06:31:31 -05:00
|
|
|
|
2017-02-07 06:44:59 -06:00
|
|
|
FIND_PACKAGE(PythonInterp 2.7 EXACT)
|
2016-10-13 06:31:31 -05:00
|
|
|
if (NOT DEFINED PYTHON_EXECUTABLE)
|
|
|
|
message("Python2.7 interpreter not found - Python wrappers not enabled")
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
|
2017-04-24 14:53:45 -05:00
|
|
|
python_package(numpy 1.7.1)
|
2016-10-13 06:31:31 -05:00
|
|
|
if (NOT DEFINED PY_numpy)
|
|
|
|
message("numpy module not found - Python wrappers not enabled")
|
|
|
|
return()
|
|
|
|
endif()
|
|
|
|
|
|
|
|
if (EXISTS "/etc/debian_version")
|
|
|
|
set( PYTHON_PACKAGE_PATH "dist-packages")
|
|
|
|
else()
|
|
|
|
set( PYTHON_PACKAGE_PATH "site-packages")
|
|
|
|
endif()
|
|
|
|
set(PYTHON_INSTALL_PREFIX "lib/python${PYTHON_VERSION_MAJOR}.${PYTHON_VERSION_MINOR}/${PYTHON_PACKAGE_PATH}" CACHE STRING "Subdirectory to install Python modules in")
|
|
|
|
|
|
|
|
|
|
|
|
if (BUILD_TESTS)
|
|
|
|
add_subdirectory( tests )
|
|
|
|
endif()
|
|
|
|
add_subdirectory( python )
|