[libxml2] python: Create .pyd on Windows



commit 5ff3baf0dc814e7bc2f4209844d7da764bfd5f46
Author: Nick Wellnhofer <wellnhofer aevum de>
Date:   Tue Sep 6 17:33:38 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 5ac71dfa..b16af1f0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -546,6 +546,9 @@ if(LIBXML2_WITH_PYTHON)
                PREFIX lib
                VERSION ${PROJECT_VERSION}
        )
+       if (WIN32)
+               set_target_properties(LibXml2Mod PROPERTIES SUFFIX ".pyd")
+       endif()
        install(
                TARGETS LibXml2Mod
                ARCHIVE DESTINATION ${LIBXML2_PYTHON_INSTALL_DIR} COMPONENT development
diff --git a/configure.ac b/configure.ac
index ec2ea515..abdc6729 100644
--- a/configure.ac
+++ b/configure.ac
@@ -748,7 +748,7 @@ PYTHON_LDFLAGS=
 if test "${PYTHON}" != ""; then
     case "$host" in
         *-*-cygwin* | *-*-mingw* | *-*-msys* )
-            PYTHON_LDFLAGS="-no-undefined"
+            PYTHON_LDFLAGS="-no-undefined -shrext .pyd"
             ;;
     esac
 fi


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