Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-2800

Restructure install file layout to prepare for darwin frameworks

    XMLWordPrintable

    Details

    • Type: Task
    • Status: Closed
    • Priority: Major - P3
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.13.0
    • Component/s: None
    • Labels:
      None

      Description

      A Darwin framework is really a magic directory/file structure that XCode understand and can use at compile and link time with the magic –F and –framework options.
      When mongoc is installed as a framework it gets put in a file structure like this:

      mongoc.framework/mongoc (the dylib with no file ending)
      mongoc.framework/Headers/*.h

      When compiling C/C++ XCode treats “mongoc.framework/Headers” as a special directory that is accessed under “mongoc/” (the framework name).

      Therefore we should change the source include paths so includes have to be included under mongoc/ or bson/.

      Our two main headers will be included by:

      #include <mongoc/mongoc.h>
      

      or

      #include <bson/bson.h>
      

      To not break any backwards compatibility we will also install forwarding headers at the root of the library so current user applications continue to work as they have includes in the following format:

      #include <mongoc.h>
      

      or

      #include <bson.h>
      

      These forwarding headers will just forward to the header in the directory.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              henrik.edin Henrik Edin
              Reporter:
              henrik.edin Henrik Edin
              Participants:
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: