Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cwalk: fix compilation when both shared and static is wanted #1566

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions releases.json
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,7 @@
"cwalk"
],
"versions": [
"1.2.9-2",
"1.2.9-1"
]
},
Expand Down
2 changes: 1 addition & 1 deletion subprojects/cwalk.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ source_hash = 54f160031687ec90a414e0656cf6266445207cb91b720dacf7a7c415d6bc7108
patch_directory = cwalk

[provide]
cwalk = cwalk_dep
dependency_names = cwalk
21 changes: 11 additions & 10 deletions subprojects/packagefiles/cwalk/meson.build
Original file line number Diff line number Diff line change
@@ -1,29 +1,30 @@
project('cwalk', 'c',
license: 'MIT',
version: '1.2.9',
meson_version: '>= 0.57.0'
meson_version: '>= 1.3.0'
)

cwalk_inc = include_directories('include')

cwalk_c_args = []
if get_option('default_library') != 'static'
cwalk_c_args += '-DCWK_SHARED'
endif

cwalk = library('cwalk', 'src/cwalk.c',
install: true,
include_directories: cwalk_inc,
c_args: cwalk_c_args
gnu_symbol_visibility: 'hidden',
c_args: '-DCWK_EXPORTS',
c_shared_args: '-DCWK_SHARED'
)

pkg = import('pkgconfig')
pkg.generate(cwalk)

install_headers('include/cwalk.h')

cwalk_dep = declare_dependency(include_directories: 'include', link_with: cwalk)
cwalk_dep = declare_dependency(
include_directories: 'include',
link_with: cwalk
)

if get_option('ENABLE_TESTS')
subdir('test')
endif

pkg = import('pkgconfig')
pkg.generate(cwalk)
Loading