wayne
wayne

Reputation: 11

meson: How to get a target 's name in meson

I add a shared_library target in meson.build

libmali = shared_library(                                                                                  
    'mali',                                                                                                  
    dummy_source,                                                                                            
    install : true,                                                                                          
    version : meson.project_version()
)  

I want to get the libmali's name "mali" by code elsewhere in this meson.build. how to get? is there any api like libmali.getname() ?

Upvotes: 1

Views: 831

Answers (1)

nielsdg
nielsdg

Reputation: 2733

Yes, but only since Meson 0.45; shared_library() returns a build target object, which has a method name() since the aforementioned version.

Upvotes: 1

Related Questions