Skip to content
Snippets Groups Projects
Verified Commit 23f2b622 authored by Pavel Doležal's avatar Pavel Doležal
Browse files

Python bindings: Modify install procedure in CMake

With this change installation path for Python bindings will take
DESTDIR into consideration when running 'make install'.
parent ccba987b
No related branches found
No related tags found
1 merge request!29Add Python bindings generated by pybind11
Pipeline #107620 passed
......@@ -69,10 +69,16 @@ if (BUILD_PYTHON_BINDINGS)
file(COPY ${PYPROJECT} DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
configure_file(${SETUP_PY_IN} ${SETUP_PY})
add_custom_target(pycdns ALL COMMAND pip3 wheel ${CMAKE_CURRENT_BINARY_DIR})
add_custom_target(pycdns ALL
COMMAND pip3 install --prefix=${CMAKE_CURRENT_BINARY_DIR}/build_python/ ${CMAKE_CURRENT_BINARY_DIR}
)
add_dependencies(pycdns cdns)
install(CODE "execute_process(COMMAND pip3 install --prefix=${CMAKE_INSTALL_PREFIX} ${CMAKE_CURRENT_BINARY_DIR})")
install(
DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/build_python/
DESTINATION ${CMAKE_INSTALL_PREFIX}
PATTERN "*"
)
endif(BUILD_PYTHON_BINDINGS)
if(BUILD_TESTS)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment