Skip to content

Commit

Permalink
libwebp: Don't define WEBP_DLL macro when building a static library
Browse files Browse the repository at this point in the history
Before it would define the WEBP_DLL macro unconditionally, which caused it to use the __declspec(dllexport) property when building as a static library on Windows. That caused its symbols to be exported from any target which the static libwebp was linked into (such as an executable).
  • Loading branch information
LandonTheCoder authored and neheb committed Nov 3, 2024
1 parent bdb5dbe commit 37b8cf9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -2083,6 +2083,7 @@
"libwebpmux"
],
"versions": [
"1.3.2-2",
"1.3.2-1",
"1.3.1-2",
"1.3.1-1"
Expand Down
6 changes: 5 additions & 1 deletion subprojects/packagefiles/libwebp/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,11 @@ pkg = import('pkgconfig')

m_dep = cc.find_library('m', required: false)

add_project_arguments('-DHAVE_CONFIG_H', '-DWEBP_DLL', language: 'c')
add_project_arguments('-DHAVE_CONFIG_H', language: 'c')

if get_option('default_library') != 'static'
add_project_arguments('-DWEBP_DLL', language: 'c')
endif

top_includes = include_directories('.', 'src')

Expand Down

0 comments on commit 37b8cf9

Please sign in to comment.