Skip to content

Commit f197764

Browse files
m-clareaothms
authored andcommitted
Added build instructions for MacOS
1 parent 8b1a389 commit f197764

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

README.md

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -136,6 +136,34 @@ If all worked out correctly you can now use IfcOpenShell. See the examples below
136136
**6)** Install the project if wanted:
137137

138138
$ sudo make install
139+
140+
### Installing on MacOS Using Homebrew
141+
142+
**1)** Install all dependencies using [Homebrew](https://brew.sh/)
143+
144+
```{shell}
145+
$ brew install boost swig cmake ftgl cgal gmp libaec opencascade
146+
```
147+
148+
**2)** Clone the git repo and its submodules
149+
```{shell}
150+
$ git clone --recurse-submodules https://github.com/IfcOpenShell/IfcOpenShell.git
151+
```
152+
**3)** Build IfcOpenShell with flags for Homebrew dependencies (```/usr/local/```)
153+
```{shell}
154+
$ cd /path/to/IfcOpenShell
155+
$ mkdir build && cd build
156+
$ cmake ../cmake -DOCC_LIBRARY_DIR=/usr/local/lib/ \
157+
-DOCC_INCLUDE_DIR=/usr/local/include/opencascade/ \
158+
-DCOLLADA_SUPPORT=0 \
159+
-DCGAL_INCLUDE_DIR=/usr/local/include/ \
160+
-DGMP_LIBRARY_DIR=/usr/local/lib/ \
161+
-DMPFR_LIBRARY_DIR=/usr/local/lib/
162+
163+
$ make -j -lboost_options
164+
```
165+
166+
Note: Make sure to compile using XCode, rather than a ```brew``` installed C/C++ compiler.
139167

140168
Installing IfcOpenShell with Conda
141169
----------------------------------

0 commit comments

Comments
 (0)