[CDRIVER-2800] Restructure install file layout to prepare for darwin frameworks Created: 22/Aug/18  Updated: 28/Oct/23  Resolved: 07/Sep/18

Status: Closed
Project: C Driver
Component/s: None
Affects Version/s: None
Fix Version/s: 1.13.0

Type: Task Priority: Major - P3
Reporter: Henrik Edin Assignee: Henrik Edin
Resolution: Fixed Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
is depended on by CDRIVER-2801 Support creating darwin framework Closed
Related
related to MONGOCRYPT-213 Directory structure does not allow fo... Closed

 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.



 Comments   
Comment by Githook User [ 08/Sep/18 ]

Author:

{'name': 'Roberto C. Sánchez', 'email': 'roberto@connexer.com', 'username': 'rcsanchez97'}

Message: CDRIVER-2800 fix Debian packaging for new header install location
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/6ea7737dcce8eb4c46c59ae40513d981978892ca

Comment by Githook User [ 05/Sep/18 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: CDRIVER-2800 Fix .rst files to reflect new install path.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/a436f27777452f887a6a66ef8c5648cc49ad5e2e

Comment by Githook User [ 24/Aug/18 ]

Author:

{'name': 'Henrik Edin', 'email': 'henrik.edin@mongodb.com', 'username': 'henrikedin'}

Message: CDRIVER-2800 Restructure install directory.

All mongoc headers are under mongoc/ and all bson headers are under
bson/. The preferred way of including the headers are mongoc/mongoc.h
and bson/bson.h respectively. Forwarding headers in the root are
provided for backwards compatibility.

Preparation work to be able to create darwin style frameworks.
Branch: master
https://github.com/mongodb/mongo-c-driver/commit/b3bdc57c2009eb918857bd9657bb8bf953a6840b

Generated at Wed Feb 07 21:16:22 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.