[openslide] produce expected DLL name (#46785)

This commit is contained in:
Benjamin Gilbert
2025-08-06 12:49:47 -07:00
committed by GitHub
parent aceb85fdc3
commit aea87e1752
5 changed files with 35 additions and 2 deletions

View File

@@ -8,6 +8,7 @@ vcpkg_from_github(
cross-build.diff
fix-win-build.patch
slidetool-unicode.patch
windows-dll-name.patch
)
if(VCPKG_CROSSCOMPILING)
file(COPY

View File

@@ -1,7 +1,7 @@
{
"name": "openslide",
"version": "4.0.0",
"port-version": 3,
"port-version": 4,
"description": "OpenSlide is a C library for reading whole slide image files (also known as virtual slides). It provides a consistent and simple API for reading files from multiple vendors.",
"homepage": "https://openslide.org/",
"license": "LGPL-2.1-only",

View File

@@ -0,0 +1,27 @@
commit 6d80b9db41810eb316d81cd2149265b89f5dc35f
Author: Benjamin Gilbert <bgilbert@cs.cmu.edu>
Date: Mon Aug 4 21:32:06 2025 -0600
meson: use `lib` library prefix when building on Windows
Meson defaults to omitting the `lib` library prefix on Windows except when
building with MinGW, producing openslide-1.dll. OpenSlide Java, OpenSlide
Python, and other bindings assume the library is libopenslide-1.dll, since
that's what openslide-bin ships. Ensure we use that name.
Signed-off-by: Benjamin Gilbert <bgilbert@cs.cmu.edu>
diff --git a/src/meson.build b/src/meson.build
index 676e5feb3f56..821fc3b938fc 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -81,6 +81,9 @@ libopenslide = library(
openslide_sources,
version : soversion,
c_args : ['-D_OPENSLIDE_BUILDING_DLL', '-DG_LOG_DOMAIN="OpenSlide"'],
+ # Meson omits 'lib' by default on Windows except on MinGW. Maintain
+ # compatibility with the MinGW build, since it was here first.
+ name_prefix : host_machine.system() == 'windows' ? 'lib' : [],
gnu_symbol_visibility : visibility,
include_directories : config_h_include,
dependencies : [

View File

@@ -7082,7 +7082,7 @@
},
"openslide": {
"baseline": "4.0.0",
"port-version": 3
"port-version": 4
},
"openssl": {
"baseline": "3.5.1",

View File

@@ -1,5 +1,10 @@
{
"versions": [
{
"git-tree": "b567364c9a7a35be645762c75647b9a27509429d",
"version": "4.0.0",
"port-version": 4
},
{
"git-tree": "38b3b2656b0bff8bc0db907e97f1d6f6e90a740a",
"version": "4.0.0",