Files
MINGW-packages/mingw-w64-libicsneo/003-python-bindings.patch
2025-10-28 12:40:07 +03:00

23 lines
1.0 KiB
Diff

--- libicsneo-1.1.0/bindings/python/CMakeLists.txt.orig 2025-10-28 10:33:34.696221700 +0300
+++ libicsneo-1.1.0/bindings/python/CMakeLists.txt 2025-10-28 10:34:01.456679300 +0300
@@ -43,12 +43,16 @@
)
target_link_libraries(icsneopy PRIVATE icsneocpp)
-install(TARGETS icsneopy LIBRARY DESTINATION icsneopy)
+set (PYTHON_VERSION_FOUND ${Python_VERSION_MAJOR}.${Python_VERSION_MINOR})
+if (NOT DEFINED PYTHON_SITE_DIR)
+ set (PYTHON_SITE_DIR "${CMAKE_INSTALL_LIBDIR}/python${PYTHON_VERSION_FOUND}/site-packages/icsneopy")
+endif ()
+install(TARGETS icsneopy LIBRARY DESTINATION ${PYTHON_SITE_DIR})
find_program(STUBGEN_EXE stubgen)
if(STUBGEN_EXE)
add_custom_command(TARGET icsneopy POST_BUILD COMMAND stubgen -v -p icsneopy -o .)
- install(FILES ${CMAKE_CURRENT_BINARY_DIR}/icsneopy.pyi py.typed DESTINATION icsneopy)
+ install(FILES ${CMAKE_CURRENT_BINARY_DIR}/icsneopy.pyi py.typed DESTINATION ${PYTHON_SITE_DIR})
endif()
-install(FILES __init__.py DESTINATION icsneopy)
+install(FILES __init__.py DESTINATION ${PYTHON_SITE_DIR})