1 find_package(Boost REQUIRED COMPONENTS python)
2 find_package(PythonLibs REQUIRED)
3 find_package(PythonInterp REQUIRED)
4 find_package(PythonExtensionDir REQUIRED)
5 message(STATUS "Python includes are situated in (${PYTHON_INCLUDE_PATH}, ${PYTHON_INCLUDE_DIRS})")
7 include_directories(../../include)
8 include_directories(..)
9 include_directories(${PYTHON_INCLUDE_PATH})
10 include_directories(${PYTHON_INCLUDE_DIRS})
11 add_library(elliptics_python SHARED elliptics_python.cpp)
12 target_link_libraries(elliptics_python ${Boost_LIBRARIES} ${PYTHON_LIBRARIES} elliptics_cpp)
13 set_target_properties(elliptics_python PROPERTIES
14 VERSION ${ELLIPTICS_VERSION}
15 SOVERSION ${ELLIPTICS_VERSION_ABI}
18 install(TARGETS elliptics_python
19 LIBRARY DESTINATION ${PYTHON_EXTENSION_DIR}
20 ARCHIVE DESTINATION ${PYTHON_EXTENSION_DIR}
21 BUNDLE DESTINATION library
24 install(CODE "EXECUTE_PROCESS(
25 COMMAND ${PYTHON_EXECUTABLE} setup.py install --prefix=${CMAKE_INSTALL_PATH}
26 WORKING_DIRECTORY ${CMAKE_SOURCE_DIR}/bindings/python/