Skip to content
Discussion options

You must be logged in to vote

That's why you will want to check like:

if get_option('default_library') != 'static'`
    # define SHARED, because it is shared, and not
    # BUILDING_ITSELF, because this is the interface dep
    public_flags = ['MYLIBNAME_SHARED']
else
    # static library 
    public_flags = []
endif

mylibname_dep = declare_dependency(
    ...,
    compile_args: public_flags
)

Replies: 2 comments 4 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
4 replies
@eli-schwartz
Comment options

@MarkLagodych
Comment options

@eli-schwartz
Comment options

Answer selected by eli-schwartz
@MarkLagodych
Comment options

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