Skip to content

Commit 3d20aaa

Browse files
cwalk: fix compilation when both shared and static is wanted
1 parent 0e5b837 commit 3d20aaa

File tree

3 files changed

+13
-11
lines changed

3 files changed

+13
-11
lines changed

releases.json

+1
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,7 @@
513513
"cwalk"
514514
],
515515
"versions": [
516+
"1.2.9-2",
516517
"1.2.9-1"
517518
]
518519
},

subprojects/cwalk.wrap

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,4 @@ source_hash = 54f160031687ec90a414e0656cf6266445207cb91b720dacf7a7c415d6bc7108
66
patch_directory = cwalk
77

88
[provide]
9-
cwalk = cwalk_dep
9+
dependency_names = cwalk

subprojects/packagefiles/cwalk/meson.build

+11-10
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,30 @@
11
project('cwalk', 'c',
22
license: 'MIT',
33
version: '1.2.9',
4-
meson_version: '>= 0.57.0'
4+
meson_version: '>= 1.3.0'
55
)
66

77
cwalk_inc = include_directories('include')
88

9-
cwalk_c_args = []
10-
if get_option('default_library') != 'static'
11-
cwalk_c_args += '-DCWK_SHARED'
12-
endif
13-
149
cwalk = library('cwalk', 'src/cwalk.c',
1510
install: true,
1611
include_directories: cwalk_inc,
17-
c_args: cwalk_c_args
12+
gnu_symbol_visibility: 'hidden',
13+
c_args: '-DCWK_EXPORTS',
14+
c_shared_args: '-DCWK_SHARED'
1815
)
1916

17+
pkg = import('pkgconfig')
18+
pkg.generate(cwalk)
19+
2020
install_headers('include/cwalk.h')
2121

22-
cwalk_dep = declare_dependency(include_directories: 'include', link_with: cwalk)
22+
cwalk_dep = declare_dependency(
23+
include_directories: 'include',
24+
link_with: cwalk
25+
)
2326

2427
if get_option('ENABLE_TESTS')
2528
subdir('test')
2629
endif
2730

28-
pkg = import('pkgconfig')
29-
pkg.generate(cwalk)

0 commit comments

Comments
 (0)