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

Restructure install file layout to prepare for darwin frameworks

    • Type: Icon: Task Task
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.13.0
    • Affects Version/s: None
    • Component/s: None
    • None

      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.

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

              Created:
              Updated:
              Resolved: