aboutsummaryrefslogtreecommitdiff
path: root/vcpkg/ports/openslide/windows-dll-name.patch
blob: ea863a6eaa0f8c4c6d58b92920b263e2f6bd4aed (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
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 : [