2015-09-02 23:04:42 +02:00
|
|
|
find_package (PythonInterp REQUIRED)
|
2016-10-04 12:49:05 +02:00
|
|
|
find_package (Cwrap)
|
2015-09-02 23:04:42 +02:00
|
|
|
|
2016-10-04 15:27:39 +02:00
|
|
|
if (CWRAP_PYTHON_PATH)
|
2016-07-01 15:25:33 +02:00
|
|
|
add_subdirectory( c_inter )
|
2015-09-02 23:04:42 +02:00
|
|
|
|
2016-07-01 15:25:33 +02:00
|
|
|
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")
|
2015-09-02 23:04:42 +02:00
|
|
|
|
|
|
|
|
|
2016-07-01 15:25:33 +02:00
|
|
|
include(cmake/python.cmake)
|
|
|
|
|
add_subdirectory( python )
|
|
|
|
|
add_subdirectory( tests )
|
|
|
|
|
else()
|
2016-10-04 15:27:39 +02:00
|
|
|
message("Could not find cwrap - Python bindings to Ert skipped")
|
2016-07-01 15:25:33 +02:00
|
|
|
endif()
|