[libxslt] python: Create .pyd on Windows



commit 01606d767b00292b56cf0b62748e717588ae3a6b
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Tue Sep 6 17:23:00 2022 +0200

    python: Create .pyd on Windows

 CMakeLists.txt | 3 +++
 configure.ac   | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
---
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 339b42c9..85aa2b81 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -404,6 +404,9 @@ if(LIBXSLT_WITH_PYTHON)
                PREFIX lib
                VERSION ${PROJECT_VERSION}
        )
+       if (WIN32)
+               set_target_properties(LibXsltMod PROPERTIES SUFFIX ".pyd")
+       endif()
        install(
                TARGETS LibXsltMod
                ARCHIVE DESTINATION ${LIBXSLT_PYTHON_INSTALL_DIR} COMPONENT development
diff --git a/configure.ac b/configure.ac
index d401e1de..27195247 100644
--- a/configure.ac
+++ b/configure.ac
@@ -188,7 +188,7 @@ AS_IF([test "x$with_python" != "xno"], [
     PKG_CHECK_MODULES([PYTHON], [python-${PYTHON_VERSION}])
     case "$host" in
         *-*-cygwin* | *-*-mingw* | *-*-msys* )
-            PYTHON_LDFLAGS="-no-undefined"
+            PYTHON_LDFLAGS="-no-undefined -shrext .pyd"
             ;;
     esac
 ])


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]