Uploaded image for project: 'C++ Driver'
  1. C++ Driver
  2. CXX-1257

Revise static library naming and link configuration



    • Type: Epic
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 3.2.0-rc0
    • Component/s: Build
    • Labels:
    • Epic Name:
    • Backwards Compatibility:
      Minor Change
    • Sprint:
      Perl/CXX 2017-04-14


      We've decided to have a consistent approach to static library naming and provision of .cmake and .pc files across both the C Driver and mongocxx.

      A summary of the approach is here:

      • Naming convention: For library 'foo', static libraries will be always named 'foo-static' (or that such a name will exist as symlink) on all operating systems with an OS-specific suffix (e.g. ".a" or ".lib")
      • Install both 'libfoo' and 'libfoo-static' pkg-config '.pc' files on all operating systems
      • Install both 'libfoo-config' and 'libfoo-static-config' CMake '.cmake' files on all operating systems
      • Static '.pc' and '.cmake' will not be installed if the static library is not built
      • 'libfoo.pc' (dynamic) config files will list in 'Requires' only those dynamic dependencies that must have cflags and libraries expanded for applications to compile/link successfully (i.e. to find all headers and avoid unresolved reference errors). It will not list deep dependencies in 'Requires'. It will not have 'Requires.private'. It will not add any appropriate "FOO_STATIC" defines to cflags.
      • 'libfoo-static.pc' config files will list all deep dependencies (whether dynamic or static) in 'Requires'. It will not have 'Requires.private'. It will add any appropriate "FOO_STATIC" defines to cflags.
      • Cmake '.cmake' files will follow similar conventions as the '.pc' files.


          Issue Links



              • Votes:
                1 Vote for this issue
                3 Start watching this issue


                • Created: