diff --git a/wrappers/python/CMakeLists.txt b/wrappers/python/CMakeLists.txt index d13525c02a9..a14bf475455 100644 --- a/wrappers/python/CMakeLists.txt +++ b/wrappers/python/CMakeLists.txt @@ -168,6 +168,15 @@ install(TARGETS pybackend2 pyrealsense2 ) target_include_directories(pybackend2 PRIVATE ../../src) + +else() # not BUILD_LEGACY_PYBACKEND + +install(TARGETS pyrealsense2 + RUNTIME DESTINATION ${CMAKE_INSTALL_BINDIR} + LIBRARY DESTINATION ${PYTHON_INSTALL_DIR} + ARCHIVE DESTINATION ${PYTHON_INSTALL_DIR} +) + endif() # BUILD_LEGACY_PYBACKEND write_basic_package_version_file("${CMAKE_CURRENT_BINARY_DIR}/pyrealsense2ConfigVersion.cmake" @@ -192,6 +201,10 @@ install(FILES "${CMAKE_BINARY_DIR}/wrappers/python/pyrealsense2ConfigVersion.cma DESTINATION ${CMAKECONFIG_PY_INSTALL_DIR} ) +install(FILES pyrealsense2/__init__.py + DESTINATION ${PYTHON_INSTALL_DIR} +) + target_include_directories(pyrealsense2 PRIVATE ../../src) if (BUILD_PYTHON_DOCS)