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

Revise static library naming and link configuration

    • Type: Icon: Epic Epic
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • 3.2.0-rc0
    • Affects Version/s: None
    • Component/s: Build
    • None
    • Done
    • static-linking
    • Minor Change

      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.

            Assignee:
            rassi J Rassi
            Reporter:
            david.golden@mongodb.com David Golden
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: