Skip to content

What to use for first argument of pkg.generate() when library target has 'name_prefix' set #9746

Answered by eli-schwartz
andy5995 asked this question in Q&A
Discussion options

You must be logged in to vote

I guess meson isn't (currently?) clever enough to notice that the name_prefix is still the default value on Linux, so it emits the warning anyway. In theory, this could be something meson learns to do...

Something that should work either way is:

kwargs = {}
if host_machine.system() == 'windows'
        kwargs = {'name_prefix': 'lib'} # always call it libui, even in Windows DLLs
endif

libui_libui = library('ui', libui_sources,
	dependencies: libui_deps,
	build_rpath: libui_rpath,
	install_rpath: libui_rpath,
	install: true,
	gnu_symbol_visibility: 'hidden',
	c_args: ['-Dlibui_EXPORTS'],
	cpp_args: ['-Dlibui_EXPORTS'],
	objc_args: ['-Dlibui_EXPORTS'],
	link_args: libui_libui_link_args,
	so…

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@andy5995
Comment options

Answer selected by andy5995
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants