Build same library with static and shared linkage

Hi.

I want to build my library “myLib” - having a dependency to “externLib” in all variations:

  • Debug & Release mode
  • static & dynamic
    => 4 different libs

Now I also need variants of the linkage type for all library versions.
Means that all variations above should also have a version of linked static and shared.
How can I achieve this?
Could you provide me some sample code how to extend my script.

model {
      buildTypes {
        debug
        release
      }  
  
  components {
    myLib(NativeLibrarySpec) {
      sources {
        cpp {
          source {
            //add sources
          }

          lib library: 'externLib', linkage: 'shared'
        }
      }
    } // myLib
  } // components
  
} // model