title: How to C++ compile staticly thired party library which contains another library that others are using in main app
body: <p>i have 2 OSS thired party librarys which all are using another thired party library all compiles as STATIC.<br>
  For the sake of context what i have:<br>
  static libssh -> using static openssl lib<br>
  static libcurl -> using static openssl lib<br>
  My main app that is using openssl static 
  Now i compile libssh and libcurl as static libs speratly they all compile with static version of openssl<br>
  As i understand now libcurl and libssh contains the static links openssl<br>
  If its true i have 2 openssl embedded in libssh and libcurl which embeddedalso in to my app plus another one that my own main app is using .<br>
  My question is how to compile statically the third party libraries but make them use 1 copy of static openssl ?<br>
  I don't want to import libssh  libcurl source code into my app but link them statically as separate lib files.</p>