update doc for building on macOS

This commit is contained in:
Dirk Olbrich
2022-09-08 17:23:29 +02:00
committed by Thomas Krijnen
parent e94a5c97df
commit ca76b77130
2 changed files with 81 additions and 62 deletions
+59 -49
View File
@@ -9,15 +9,15 @@ For more information, see
* [http://ifcopenshell.org](http://ifcopenshell.org) * [http://ifcopenshell.org](http://ifcopenshell.org)
* [http://academy.ifcopenshell.org](http://academy.ifcopenshell.org) * [http://academy.ifcopenshell.org](http://academy.ifcopenshell.org)
Service | Status | Service | Status |
--- | --- | ----------------------------------------------- | -------------------------------------------------------------------------------------------------------------------------------------------- |
Anaconda Daily Build | [![Anaconda-Server Badge](https://img.shields.io/conda/vn/ifcopenshell/ifcopenshell)](https://anaconda.org/ifcopenshell/ifcopenshell) | Anaconda Daily Build | [![Anaconda-Server Badge](https://img.shields.io/conda/vn/ifcopenshell/ifcopenshell)](https://anaconda.org/ifcopenshell/ifcopenshell) |
Anaconda v0.7.0 Stable | [![Anaconda-Server Badge](https://img.shields.io/conda/vn/conda-forge/ifcopenshell)](https://anaconda.org/conda-forge/ifcopenshell) | Anaconda v0.7.0 Stable | [![Anaconda-Server Badge](https://img.shields.io/conda/vn/conda-forge/ifcopenshell)](https://anaconda.org/conda-forge/ifcopenshell) |
PyPi Daily Build | [![PyPi Badge](https://img.shields.io/pypi/v/ifcopenshell-python)](https://pypi.org/project/ifcopenshell-python/) | PyPi Daily Build | [![PyPi Badge](https://img.shields.io/pypi/v/ifcopenshell-python)](https://pypi.org/project/ifcopenshell-python/) |
ArchLinux AUR Package | [![AUR Badge](https://img.shields.io/aur/version/ifcopenshell-git)](https://aur.archlinux.org/packages/ifcopenshell-git) | ArchLinux AUR Package | [![AUR Badge](https://img.shields.io/aur/version/ifcopenshell-git)](https://aur.archlinux.org/packages/ifcopenshell-git) |
BlenderBIM Add-on Chocolatey (under moderation) | [![Chocolatey Badge](https://img.shields.io/chocolatey/v/blenderbim-nightly)](https://community.chocolatey.org/packages/blenderbim-nightly/) | BlenderBIM Add-on Chocolatey (under moderation) | [![Chocolatey Badge](https://img.shields.io/chocolatey/v/blenderbim-nightly)](https://community.chocolatey.org/packages/blenderbim-nightly/) |
Sponsor development on OpenCollective | [![Financial Contributors](https://opencollective.com/opensourcebim/tiers/badge.svg)](https://opencollective.com/opensourcebim/) | Sponsor development on OpenCollective | [![Financial Contributors](https://opencollective.com/opensourcebim/tiers/badge.svg)](https://opencollective.com/opensourcebim/) |
Docker hub | [![Docker Pulls](https://img.shields.io/docker/pulls/aecgeeks/ifcopenshell)](https://hub.docker.com/r/aecgeeks/ifcopenshell) | Docker hub | [![Docker Pulls](https://img.shields.io/docker/pulls/aecgeeks/ifcopenshell)](https://hub.docker.com/r/aecgeeks/ifcopenshell) |
Prerequisites Prerequisites
------------- -------------
@@ -169,28 +169,38 @@ If all worked out correctly you can now use IfcOpenShell. See the examples below
**1)** Install all dependencies using [Homebrew](https://brew.sh/) **1)** Install all dependencies using [Homebrew](https://brew.sh/)
```{shell} ```{shell}
$ brew install boost swig cmake ftgl cgal gmp libaec opencascade $ brew install boost cmake python3 cgal ftgl gmp libaec opencascade swig hdf5 zlib
# homebrew automatically links most libraries, except some keg-only ones
$ brew link zlib --force
``` ```
**2)** Clone the git repo and its submodules **2)** Clone the git repo and its submodules
```{shell} ```{shell}
$ git clone --recurse-submodules https://github.com/IfcOpenShell/IfcOpenShell.git $ git clone --recurse-submodules https://github.com/IfcOpenShell/IfcOpenShell.git
``` ```
**3)** Build IfcOpenShell with flags for Homebrew dependencies (```/usr/local/```) **3)** Build IfcOpenShell with flags for Homebrew dependencies: (``/usr/local/``) for Intel machines with x84_64 architecture,
(``/opt/homebrew/``) for Apple Silicon processors with arm64 architecture.
```{shell} ```{shell}
$ cd /path/to/IfcOpenShell $ cd /path/to/IfcOpenShell
$ mkdir build && cd build $ mkdir build && cd build
$ cmake ../cmake -DOCC_LIBRARY_DIR=/usr/local/lib/ \ $ cmake ../cmake
-DOCC_INCLUDE_DIR=/usr/local/include/opencascade/ \ -DPYTHON_EXECUTABLE=/opt/homebrew/bin/python3.10 \
-DCOLLADA_SUPPORT=0 \ -DPYTHON_LIBRARY=/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/libpython3.10.dylib \
-DCGAL_INCLUDE_DIR=/usr/local/include/ \ -DPYTHON_INCLUDE_DIR=/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10/ \
-DGMP_LIBRARY_DIR=/usr/local/lib/ \ -DOCC_LIBRARY_DIR=/opt/homebrew/lib/ \
-DMPFR_LIBRARY_DIR=/usr/local/lib/ -DOCC_INCLUDE_DIR=/opt/homebrew/include/opencascade/ \
-DCGAL_INCLUDE_DIR=/opt/homebrew/include/ \
$ make -j -lboost_options -DGMP_LIBRARY_DIR=/opt/homebrew/lib/ \
-DMPFR_LIBRARY_DIR=/opt/homebrew/lib/ \
-DHDF5_LIBRARY_DIR=/opt/homebrew/lib/ \
-DHDF5_INCLUDE_DIR=/opt/homebrew/include/ \
-DCOLLADA_SUPPORT=0
# Replace X with number of CPU cores, which you can get with sysctl -n hw.ncpu
$ make -j X
``` ```
Note: Make sure to compile using XCode, rather than a ```brew``` installed C/C++ compiler. Note: Make sure to compile using the XCode provided Apple Clang compiler, installed with `xcode-select --install
`, rather than a ```brew``` installed C/C++ compiler.
Installing IfcOpenShell with Conda Installing IfcOpenShell with Conda
---------------------------------- ----------------------------------
@@ -279,35 +289,35 @@ Also available are a series of utilities that are based on or related to IfcOpen
Those marked with an asterisk are part of IfcOpenShell. Those marked with an asterisk are part of IfcOpenShell.
Name | License | Name | License |
--- | --- | ------------------------- | ------------------- |
bcf | LGPL-3.0-or-later | bcf | LGPL-3.0-or-later |
blenderbim | GPL-3.0-or-later | blenderbim | GPL-3.0-or-later |
bsdd | LGPL-3.0-or-later | bsdd | LGPL-3.0-or-later |
ifc2ca | LGPL-3.0-or-later | ifc2ca | LGPL-3.0-or-later |
ifc4d | LGPL-3.0-or-later | ifc4d | LGPL-3.0-or-later |
ifc5d | LGPL-3.0-or-later | ifc5d | LGPL-3.0-or-later |
ifcbimtester | LGPL-3.0-or-later | ifcbimtester | LGPL-3.0-or-later |
ifcblender | LGPL-3.0-or-later\* | ifcblender | LGPL-3.0-or-later\* |
ifccityjson | LGPL-3.0-or-later | ifccityjson | LGPL-3.0-or-later |
ifcclash | LGPL-3.0-or-later | ifcclash | LGPL-3.0-or-later |
ifccobie | LGPL-3.0-or-later | ifccobie | LGPL-3.0-or-later |
ifcconvert | LGPL-3.0-or-later\* | ifcconvert | LGPL-3.0-or-later\* |
ifccsv | LGPL-3.0-or-later | ifccsv | LGPL-3.0-or-later |
ifcdiff | LGPL-3.0-or-later | ifcdiff | LGPL-3.0-or-later |
ifcfm | LGPL-3.0-or-later | ifcfm | LGPL-3.0-or-later |
ifcgeom | LGPL-3.0-or-later\* | ifcgeom | LGPL-3.0-or-later\* |
ifcgeom\_schema\_agnostic | LGPL-3.0-or-later\* | ifcgeom\_schema\_agnostic | LGPL-3.0-or-later\* |
ifcgeomserver | LGPL-3.0-or-later\* | ifcgeomserver | LGPL-3.0-or-later\* |
ifcjni | LGPL-3.0-or-later\* | ifcjni | LGPL-3.0-or-later\* |
ifcmax | LGPL-3.0-or-later\* | ifcmax | LGPL-3.0-or-later\* |
ifcopenshell-python | LGPL-3.0-or-later\* | ifcopenshell-python | LGPL-3.0-or-later\* |
ifcparse | LGPL-3.0-or-later\* | ifcparse | LGPL-3.0-or-later\* |
ifcpatch | LGPL-3.0-or-later | ifcpatch | LGPL-3.0-or-later |
ifcsverchok | GPL-3.0-or-later | ifcsverchok | GPL-3.0-or-later |
ifcwrap | LGPL-3.0-or-later\* | ifcwrap | LGPL-3.0-or-later\* |
qtviewer | LGPL-3.0-or-later\* | qtviewer | LGPL-3.0-or-later\* |
serializers | LGPL-3.0-or-later\* | serializers | LGPL-3.0-or-later\* |
[LGPL]: https://github.com/IfcOpenShell/IfcOpenShell/tree/master/COPYING.LESSER "LGPL-3.0-or-later" [LGPL]: https://github.com/IfcOpenShell/IfcOpenShell/tree/master/COPYING.LESSER "LGPL-3.0-or-later"
[IFC]: https://technical.buildingsmart.org/standards/ifc/ "IFC" [IFC]: https://technical.buildingsmart.org/standards/ifc/ "IFC"
@@ -96,7 +96,7 @@ operating systems. GCC (4.7 or newer) or Clang (any version) is required.
OpenCascade, your system may get confused. OpenCascade, your system may get confused.
4. For building IfcConvert with COLLADA (.dae) support (on by default), OpenCOLLADA is needed: 4. For building IfcConvert with COLLADA (.dae) support (ON by default), OpenCOLLADA is needed:
:: ::
@@ -111,13 +111,13 @@ operating systems. GCC (4.7 or newer) or Clang (any version) is required.
$ make -j X $ make -j X
$ sudo make install $ sudo make install
5. For building the IfcPython wrapper (on by default), SWIG and Python development are needed: 5. For building the IfcPython wrapper (ON by default), SWIG and Python development are needed:
:: ::
$ sudo apt-get install python-all-dev swig $ sudo apt-get install python-all-dev swig
6. For building support for HDF5 caching (off by default), install dependencies: 6. For building support for HDF5 caching (ON by default), install dependencies:
:: ::
@@ -177,22 +177,31 @@ GCC (4.7 or newer) or Clang (any version) is required.
:: ::
$ brew install boost swig cmake ftgl cgal gmp libaec opencascade $ brew install boost cmake python3 cgal ftgl gmp libaec opencascade swig hdf5 zlib
# homebrew automatically links most libraries, except some keg-only ones
$ brew link zlib --force
3. Build IfcOpenShell with flags for Homebrew dependencies (``/usr/local/``) 3. Build IfcOpenShell with flags for Homebrew dependencies: (``/usr/local/``) for Intel machines with x84_64 architecture,
(``/opt/homebrew/``) for Apple Silicon processors with arm64 architecture.
:: ::
$ cd /path/to/IfcOpenShell $ cd /path/to/IfcOpenShell
$ mkdir build && cd build $ mkdir build && cd build
$ cmake ../cmake -DOCC_LIBRARY_DIR=/usr/local/lib/ \ $ cmake ../cmake
-DOCC_INCLUDE_DIR=/usr/local/include/opencascade/ \ -DPYTHON_EXECUTABLE=/opt/homebrew/bin/python3.10 \
-DCOLLADA_SUPPORT=0 \ -DPYTHON_LIBRARY=/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/lib/libpython3.10.dylib \
-DCGAL_INCLUDE_DIR=/usr/local/include/ \ -DPYTHON_INCLUDE_DIR=/opt/homebrew/opt/python@3.10/Frameworks/Python.framework/Versions/3.10/include/python3.10/ \
-DGMP_LIBRARY_DIR=/usr/local/lib/ \ -DOCC_LIBRARY_DIR=/opt/homebrew/lib/ \
-DMPFR_LIBRARY_DIR=/usr/local/lib/ -DOCC_INCLUDE_DIR=/opt/homebrew/include/opencascade/ \
# Replace X with number of CPU cores + 1 -DCGAL_INCLUDE_DIR=/opt/homebrew/include/ \
$ make -j X -lboost_options -DGMP_LIBRARY_DIR=/opt/homebrew/lib/ \
-DMPFR_LIBRARY_DIR=/opt/homebrew/lib/
-DHDF5_LIBRARY_DIR=/opt/homebrew/lib/ \
-DHDF5_INCLUDE_DIR=/opt/homebrew/include/ \
-DCOLLADA_SUPPORT=0 \
# Replace X with number of CPU cores, which you can get with sysctl -n hw.ncpu
$ make -j X
Compiling on Windows (Visual Studio) Compiling on Windows (Visual Studio)
------------------------------------ ------------------------------------