use static library of subproject #9830
-
In one of my subprobjects, I have
In the superproject, I have
which works, but I want to link to the static library instead of shared. How can I alter the "static" element of the dep_canfigger object returned by In the subproject, I had
then in the superproject, I used
but I'm thinking there's a better way... UPDATE:I've changed
to
I still want it to statically link when using the fallback. Using this in the subproject (canfigger library meson.build)
isn't so terrible, but I just wanted to check if there's a more efficient way of doing it. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 6 replies
-
Is there any particular reason to use You can also configure it on a per subproject level using (Also you can add "both" as a default_options in the |
Beta Was this translation helpful? Give feedback.
Is there any particular reason to use
both_libraries()
to build both static and shared, rather than usinglibrary()
and letting the person building the project choose which one(s) they want by configuring with-Ddefault_library={static|shared|both}
?You can also configure it on a per subproject level using
-Dcanfigger:default_library=static
or by passingdefault_options: ['default_library=static']
as a kwarg to the subproject/dependency invocation.(Also you can add "both" as a default_options in the
project()
definition of canfigger.)