Skip to content

How to setup the major version, minor version, build version of shared #204

Answered by grafikrobot
fasxmut asked this question in Q&A
Discussion options

You must be logged in to vote

You would need to use the tag feature (https://www.bfgroup.xyz/b2/manual/release/index.html#bbv2.builtin.features.tag) on the lib target to customize the name to whatever you need. There's a version feature (https://www.bfgroup.xyz/b2/manual/release/index.html#bbv2.builtin.features.version) as a convenient place for what you tag with. your case might look like this:

rule tag-with-version ( name : type ? : property-set )
{
  if $(type) in STATIC_LIB SHARED_LIB IMPORT_LIB
  {
    local v = [ $(property-set).get <version> ] ;
    local r = [ common.format-name <base> : $(name) : $(type) : $(property-set) ] ;
    return $(r).$(v) ;
  }
}

lib fizz : fizz.cpp : <tag>@tag-with-version ;

You ca…

Replies: 1 comment 1 reply

Comment options

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

Answer selected by fasxmut
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