OpenCASCADE on MAC (Mountain Lion) - Solved!

264 views
Skip to first unread message

Silex

unread,
Sep 16, 2012, 3:17:48 PM9/16/12
to oce...@googlegroups.com
If anyone had issues with building OCE on Mountain Lion here is what worked for me!

I spent a little time on this and I think I have it. Here is what I did step by step:

Preparation phase:

  • Installing Xcode (with command line tools) = Apple developer site // If Xcode doesn't install gcc, than you can still download it from the developer site as Command Line Tools for Xcode.

  • Installing Cmake (with command line tools) = Google // You can download it from the official site with a .dmg/.pkg file extension. Easy install.

  • X11 under Mountain Lion "changed" to Xquartz. Probably it is not installed by default, but it is easy to check it. Just go to the folder "Application" and start the X11 app. If X11/Xquartz is not installed than it will install automatically!

  • Installing FTGL = MacPorts = Google // Download MacPorts from their official site, install it with the installer, than write this to the terminal:

sudo port install ftgl

Installing phase:

I. Open Terminal.

II. Run this command 
// This will set the proper PATH.

ln -s /opt/X11/include/X11 /usr/local/include/X11

III. Than from the Terminal go to the directory where you extracted the OCE file (the original extracted file name should be: tpaviot-oce-6c9a06a).

IV. Than write these commands: 
// You make a build directory to the extracted OCE folder.

mkdir build 
cd build

V. After this you give out the cmake command:

cmake -DOCE_INSTALL_PREFIX:PATH=$HOME/OCE \
-DOCE_WITH_FREEIMAGE:BOOL=ON \
-DOCE_WITH_GL2PS:BOOL=ON \
-DOCE_DRAW:BOOL=ON \
..

VI. And at the end the make commands:

make
make install/strip

If you did everything exactly like this, than it should work! I posted this little "tutorial" here too:http://stackoverflow.com/questions/11967001/how-to-build-opencascade-on-mac

Silex

unread,
Sep 16, 2012, 3:25:38 PM9/16/12
to oce...@googlegroups.com
Hint: if you don't want to run the draw example, than in the cmake flag set it off: 

2012. szeptember 16., vasárnap 21:17:48 UTC+2 időpontban Silex a következőt írta:
If anyone had issues with building OCE on Mountain Lion here is what worked for me!

I spent a little time on this and I think I have it. Here is what I did step by step: -DOCE_DRAW:BOOL=OFF

Silex

unread,
Sep 17, 2012, 11:38:58 PM9/17/12
to oce...@googlegroups.com
The build section on the wiki site has been updated with this tutorial too, with more details!

D. Barbier

unread,
Sep 18, 2012, 3:38:30 PM9/18/12
to oce...@googlegroups.com
On 2012/9/18 Silex wrote:
> The build section on the wiki site has been updated with this tutorial too,
> with more details!

And you also added a link from the Build page, this is excellent, thanks!

Denis

Silex

unread,
Sep 20, 2012, 8:25:27 PM9/20/12
to oce...@googlegroups.com
No problem! Hope it helps to people out there trying to use OCE on MAC! :)
Reply all
Reply to author
Forward
0 new messages