--- opencamlib-2023.01.11.orig/src/pythonlib/pythonlib.cmake	2024-03-16 22:57:15.932048000 +0300
+++ opencamlib-2023.01.11/src/pythonlib/pythonlib.cmake	2024-03-16 22:58:11.060035800 +0300
@@ -41,11 +41,17 @@
   target_link_libraries(ocl PRIVATE OpenMP::OpenMP_CXX)
 endif()
 
-install(TARGETS ocl LIBRARY DESTINATION "opencamlib")
+execute_process(COMMAND ${Python3_EXECUTABLE} -c
+  "import sys, sysconfig; print(sysconfig.get_path('platlib').replace(sys.prefix+'/',''))"
+  OUTPUT_VARIABLE CMAKE_INSTALL_PYDIR
+  OUTPUT_STRIP_TRAILING_WHITESPACE
+)
+
+install(TARGETS ocl LIBRARY DESTINATION "${CMAKE_INSTALL_PYDIR}/opencamlib")
 if(NOT SKBUILD)
   install(
     DIRECTORY pythonlib/opencamlib/
-    DESTINATION "opencamlib"
+    DESTINATION "${CMAKE_INSTALL_PYDIR}/opencamlib"
   )
 endif()
 
