Skip to content

Commit

Permalink
lz4: try to fix MSVC compilation
Browse files Browse the repository at this point in the history
Signed-off-by: Rosen Penev <[email protected]>
  • Loading branch information
neheb committed Sep 3, 2022
1 parent 8bb8925 commit b21b8ed
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 7 deletions.
6 changes: 0 additions & 6 deletions ci_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -324,12 +324,6 @@
"lmdb:programs=true"
]
},
"lz4": {
"_comment": "dllexport strikes again",
"build_on": {
"windows": false
}
},
"mpdecimal": {
"build_options": [
"mpdecimal:examples=true",
Expand Down
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -1241,6 +1241,7 @@
"liblz4"
],
"versions": [
"1.9.4-2",
"1.9.4-1",
"1.9.3-1",
"1.9.2-1"
Expand Down
14 changes: 13 additions & 1 deletion subprojects/packagefiles/lz4/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@

project(
'lz4',
['c'],
'c',
license: 'BSD-2-Clause-Patent AND GPL-2.0-or-later',
default_options: [
'c_std=c99',
Expand All @@ -383,4 +383,16 @@ project(
meson_version: '>=0.49.0'
)

# upstream meson.build has this as c_args that get passed to nowhere
if host_machine.system() == 'windows' and get_option('default_library') != 'static'
add_project_arguments('-DLZ4_DLL_EXPORT=1', language: 'c')
endif

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

subdir('contrib/meson/meson')

0 comments on commit b21b8ed

Please sign in to comment.