Added find_package: python_interp and ERTPython.

This commit is contained in:
Joakim Hove
2015-09-02 23:04:42 +02:00
parent 1018c9ef4c
commit 45c3ffbe15
2 changed files with 20 additions and 0 deletions

View File

@@ -350,3 +350,7 @@ include( ${PROJECT_SOURCE_DIR}/cmake/Modules/install_headers.cmake )
install_headers( "${HEADER_FILES}" "${CMAKE_INSTALL_PREFIX}" )
install( TARGETS opmparser DESTINATION ${CMAKE_INSTALL_LIBDIR} )
install( FILES ${PROJECT_BINARY_DIR}/generated-source/include/opm/parser/eclipse/Parser/ParserKeywords.hpp DESTINATION "include/opm/parser/eclipse/Parser")
if (ENABLE_PYTHON)
add_subdirectory( python )
endif()

View File

@@ -0,0 +1,16 @@
find_package (PythonInterp REQUIRED)
find_package (ERTPython REQUIRED)
add_subdirectory( c_inter )
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")
include(cmake/python.cmake)
add_subdirectory( python )
add_subdirectory( tests )