Skip to content

use static library of subproject #9830

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

You must be logged in to vote

Is there any particular reason to use both_libraries() to build both static and shared, rather than using library() 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 passing default_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.)

Replies: 1 comment 6 replies

Comment options

You must be logged in to vote
6 replies
@andy5995
Comment options

@eli-schwartz
Comment options

@andy5995
Comment options

@eli-schwartz
Comment options

@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