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

Revise static library naming and link configuration

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                • Created:
                  Updated:
                  Resolved: